• 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: Retrieving key from NSDictionary in a binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Retrieving key from NSDictionary in a binding


  • Subject: Re: Retrieving key from NSDictionary in a binding
  • From: Art Isbell <email@hidden>
  • Date: Thu, 2 Sep 2004 13:48:32 -1000

On Sep 2, 2004, at 12:47 PM, Tom Jones wrote:

So I have an NSDictionary where each key is the entityName of a
descendant of EOGenericRecord and each value is an NSArray of  the
corresponding entity. Can I bind one of these arrays to a control's
list in WOBuilder?

NSDictionary myDictionary

bind to (NSArray) myDictionary.objectForKey("myEntityName")

It's even better than that: myDictionary.myEntityName.

NSDictionary conforms to the NSKeyValueCoding protocol, so myDictionary.myEntityName is shorthand for myDictionary.valueForKey("myEntityName"). However, in WOBuilder, you'll need to manually enter the dictionary key because there's really no way that WOBuilder can present the possible dictionary keys.

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Retrieving key from NSDictionary in a binding (From: Tom Jones <email@hidden>)

  • Prev by Date: When do I use addObjectToBothSidesOfRelationshipWithKey?
  • Next by Date: Re: OT: Java Based TEXTAREA -> HTML Library
  • Previous by thread: Retrieving key from NSDictionary in a binding
  • Next by thread: When do I use addObjectToBothSidesOfRelationshipWithKey?
  • Index(es):
    • Date
    • Thread