• 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: Using bindings with an NSArray of NSStrings ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using bindings with an NSArray of NSStrings ?


  • Subject: Re: Using bindings with an NSArray of NSStrings ?
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 16 Mar 2004 15:31:47 -0500

Yes, this is an issue... if having just string manipulation is a significant requirement, please file an enhancement bug.. in the meantime...

On Mar 16, 2004, at 3:10 PM, Bjoern Kriews wrote:

I have come across a few occasions where parts of my model are so simple that I'd like to use just
NSArrays of NSStrings. As far as I know now, I have to resort to making them into dictionaries
with one key each.

Is there an elegant way to solve this (getting away without the dictionaries ?)

Sort of.

You could write a two-way Value Transformer that handles the conversion of the array of strings to an array of dictionaries in one direction, and then back again in the other. you'd need to set the content of the array controller as Handles As Compound Value.

The disadvantage of this is that you can have issues with objects that retain references to the original strings rather than just the string contents themselves.


(Right now I am teching Cocoa to a group of interested coworkers and I'd like to keep my examples
as simple as possible)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Using bindings with an NSArray of NSStrings ?
      • From: Bjoern Kriews <email@hidden>
References: 
 >Using bindings with an NSArray of NSStrings ? (From: Bjoern Kriews <email@hidden>)

  • Prev by Date: Re: iTunes plugin/extension project
  • Next by Date: Re: stopTracking in NSButtonCell [solution]
  • Previous by thread: Using bindings with an NSArray of NSStrings ?
  • Next by thread: Re: Using bindings with an NSArray of NSStrings ?
  • Index(es):
    • Date
    • Thread