On 21 Sep 2015, at 19:46, Eric Wasylishen <[email protected]> wrote:
> 
> Yes, COObject and any subclass should be automatically KVC/KVO compliant.
> Quentin: any special exceptions I'm forgetting?
> 
> COAttributedStringWrapper.m (in CoreObject/Extras/Model) is an example of an 
> NSTextStorage implementation that uses KVO to observe some model objects. 
> This is used in the Typewriter sample app, so if you undo changes/revert to 
> an old revision, the UI updates automatically. Typewriter and 
> COAttributedStringWrapper.m are only tested on OS X, however.

Thanks, I’d been working from the Typewriter example as a base.  I changed the 
notes table view to use bindings and it works very well for getting the 
properties (and sorting notes by different table fields now works!).  Editing 
is a bit more complex though.  In part, I think that this is because the 
Typewriter application puts a lot of the editing logic into the controller, 
rather than the model.  I presume that the best way of doing this is to expose, 
on the model object, some KVC / KVO-compilant wrapper methods that do 
human-friendly updates?

I’ve also hit a very weird bug where I try to make a master-detail view with 
the tags field and I get an exception that NSArrayController is not KVC 
compliant for selection (which is really odd, because a master-detail view for 
the name field works fine).

My plan is to work on OS X and then eventually add the missing bits to GNUstep 
when I try to port it back to FreeBSD - GNUstep doesn’t improve if people keep 
working around its limitations...

David

-- Sent from my brain


_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to