I have an NSTableView, bound to an NSArrayController, which is bound
to my custom object. So far so good. I can change attributes, add,
remove, all that good stuff. Now, my custom object can have one
property changed programmatically by an NSTimer. Of course, when the
change happens, the object is updated but not the NSTableView.

Chances are, you are not updating the property in a KVO-compliant way.
First, make sure you are doing things correctly, before kludging a
workaround.

See:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Conc
epts/Troubleshooting.html#//apple_ref/doc/uid/TP40002148- DontLinkElementID_6

And if you haven't read that whole document, you really really need to.

That was it - there were two places in my object where I was updating the property directly rather than calling the accessor. Sigh. I have read the bindings docs, but skipped the troubleshooting section (in fact, forgot it was there). A couple of people pointed this out. Mea culpa.


My second question is more general. I've basically just completed the
Cocoa Programming book by Hillegass. Is there a "next" logical book/
document to read, or is it just time to write lots of experimental
code and ask questions?

Write lots of experimental code, but read relevant docs *before* you ask questions. Get AppKiDo <http://homepage.mac.com/aglee/downloads>. Not only does it greatly simplify browsing the API, it also makes it easy to find
conceptual documentation.

Unfortunately, just about every Cocoa book on the market is sorely out of
date. Kochan's Objectice-C book, however, is a must-have must-read.

I have Kochan's book. Haven't read through the whole thing, just been using it as a reference. I'll go back through it. With a large collection of frameworks like Cocoa it's sometimes hard to know when to keep digging and when to ask, but after spinning on this for a couple of days I decided I should ask.

Just downloaded AppKiDo - looks nice.

Thanks,
jay
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to