• 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: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]


  • Subject: Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]
  • From: "Owen Yamauchi" <email@hidden>
  • Date: Sat, 28 Jun 2008 18:35:59 -0700

On Sat, Jun 28, 2008 at 6:24 PM, Ben Trumbull <email@hidden> wrote:
>> Which is, frankly, a bit goofy and, thus, the primary reason why I
>> would avoid using -valueForKey: on a dictionary.
>
> Amen.  It's slower, and people reading your code can get very confused.

Then is there a recommended way of binding to the contents of
dictionaries? For example, suppose I have an NSObjectController
representing some object, which has an NSDictionary (let's say it's
called "attributes") as a property. Then can I bind to the value
stored under a key in that dictionary? Say I want to bind a text
field's value to whatever is stored under the key "name" in the
"attributes" dictionary. The intuitive (to me) thing to do is bind to
the NSObjectController, controller key "selection", model key path
"attributes.name". But that won't work. Is there a good solution?

Owen
_______________________________________________

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

  • Follow-Ups:
    • Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]
      • From: "Kyle Sluder" <email@hidden>
References: 
 >valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject] (From: Ben Trumbull <email@hidden>)

  • Prev by Date: Re: Methods that return autoreleased objects?
  • Next by Date: Re: NSTextView to replace NSTextList confused
  • Previous by thread: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]
  • Next by thread: Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]
  • Index(es):
    • Date
    • Thread