• 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
Binding to an array of NSStrings stored in an application's preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding to an array of NSStrings stored in an application's preferences


  • Subject: Binding to an array of NSStrings stored in an application's preferences
  • From: A B <email@hidden>
  • Date: Wed, 29 Jul 2009 15:15:37 -0700

OK, I'm feeling really REALLY stupid for asking this question, but I've managed to stump myself so hard that I doubt I have the proper detachment to figure out the answer for myself any more.  My apologies in advance...

I have been playing around with bindings for a while now and LOVE them.  That and the KVO/KVC conventions built into Objective-C 2.0 have allowed me to dramatically slim down my applications while increasing their reliability, flexibility, etc.  I say this for no other reason than to illustrate that I am at least moderately comfortable with bindings in general.  That being said, my problem is this:

I have an application where I'd like to store an editable set of keywords by way of the preferences controller.  Easy, right?  Unfortunately, for the life of me I can't figure out how to do it.  I set up an array controller and point it to the shared preferences object and give it a keypath for the array.  The problem is that the objects being stored in the array are NSStrings and I don't see how NSStrings can be KVC-compliant for this kind of operation due to the lack of any "stringValue/setStringValue" methods.  Without those, what keypath do I use in the NSTableView I have set up to facilitate manipulation of that list?

Also, since the shared preferences object is not one that I own, I'm not sure how to go about setting up a new array to represent an unedited/newly installed state.  (Registering them as defaults doesn't seem to be working for me.)

So to reiterate my questions more succinctly: How can you bind a table view to an array of NSStrings and how can you store said array in an application's preferences?

Any pointers or advice that you can offer would be VERY much appreciated.  The headaches I'm getting from this are starting to get the better of me. :)
_______________________________________________

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: Binding to an array of NSStrings stored in an application's preferences
      • From: Rob Keniger <email@hidden>
    • Re: Binding to an array of NSStrings stored in an application's preferences
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: where can I download xcode 3.2
  • Next by Date: Listening to Eject command
  • Previous by thread: Re: NSUserDefault and Negative numerical arguments (Was: Posting mouse clicks with multiple displays)
  • Next by thread: Re: Binding to an array of NSStrings stored in an application's preferences
  • Index(es):
    • Date
    • Thread