• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa-dev Digest, Vol 5, Issue 432
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 5, Issue 432


  • Subject: Re: Cocoa-dev Digest, Vol 5, Issue 432
  • From: Jay Martin <email@hidden>
  • Date: Tue, 18 Mar 2008 18:41:56 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: Modifying glyph storage in NSLayoutManager SOLVED
  • Next by Date: Re: Creating Custom Views in Interface Builder
  • Previous by thread: PopupButton
  • Next by thread: CGFloat in 10.4
  • Index(es):
    • Date
    • Thread