Issue from RoomStore.swift file (Session: Introducing SwiftUI: Building Your First App)

Hello All,


I am following the session "Introducing SwiftUI: Building Your First App" and building the Rooms App.
In the RoomStore.swift file, I encountered an issue saying "Cannot invoke 'send' with no argument". (As the image below)
Anyone knows how should I resolve this issue?
In case if the image doesn't show, here is the link: https://drive.google.com/file/d/1B87jxSiGr03PJGGUMOWeMBkuWJ4t_IoL/view?usp=sharing


Thank you!
Linne

Replies

class RoomStore: BindableObject {

var rooms: [Room] {

didSet {

self.didChange.send(Void())

}

}

init(rooms:[Room] = []) {

self.rooms = rooms

}

var didChange = PassthroughSubject<Void, Never>()

}

A workaround with didChange.(()) worked in Beta1. With Beta2 today the way they showed it with just didChange.send() works!


There is still a lot of missing parts from this demo move ane remove atOffsets are not in Beta2 for example. It is very frustrating.

With the latest Betas (4) this cde now reports an error Type 'RoomStore' does not conform to protocol 'BindableObject'. it then asks if you want to fix by adding protocol stubs and when you select that it still doesn't work. Any ideas on how to fix this ?

didChange has been replaced with willChange on Bindable protocols I think