• 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
NSTreeController vs. representedObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController vs. representedObject


  • Subject: NSTreeController vs. representedObject
  • From: Murat Konar <email@hidden>
  • Date: Fri, 25 May 2007 18:48:54 -0700

I'm playing with a design using bindings and an outline view with one column.

My model objects are dictionaries, and I have an NSCell subclass that renders a display depending on more than one value in my model objects. So my cell needs access to the model object itself (i.e. the dictionary), not just a value in the dictionary.

It seems like the way to do this is to bind my column's "value" binding to my treecontroller's "arrangedObjects" and leave the optional "Model Key Path" blank. I had hoped that my cell subclass could then look at its "representedObject" and find a dictionary there, but no dice: it's always nil. Must I resort to implementing "outlineView:willDisplayCell:forTableColumn:item:" in my outline view's delegate and setting the represented object there?

_murat
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Memory Management Question
  • Next by Date: Core Data, NSPopUpButton, and "Edit..."
  • Previous by thread: Re: Memory Management Question
  • Next by thread: Core Data, NSPopUpButton, and "Edit..."
  • Index(es):
    • Date
    • Thread