• 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
NSArrayController and NSUserDefaultsController values not saving...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController and NSUserDefaultsController values not saving...


  • Subject: NSArrayController and NSUserDefaultsController values not saving...
  • From: Samuel Williams <email@hidden>
  • Date: Thu, 3 Apr 2008 05:39:08 +0900

Hi,

I have an app I am working on which will eventually be released open source available from http://svn.oriontransfer.org/Applications/GPSTool

That program has a menu item under preferences which shows a window. That window has an NSTableView bound to an NSArrayController. This appears to work okay, for example, clicking + to add a row and then editing the text appears to work. However, the row hasn't been saved correctly - I made a debug button to print out the data from the array controller and user defaults controller:

2008-04-03 05:29:50.749 GPS Tool[12595:10b] NSUserDefaultsController presetScripts: (
{
}
)
2008-04-03 05:29:50.750 GPS Tool[12595:10b] Arranged Objects: (
{
name = Bob;
}
)


For some reason, a row has been created correctly, but the data has not been updated correctly (i.e. the name Bob).

I can't seem to get this to work - I tried selecting continuously updates value, but that didn't have any effect.

It seems like for some reason, the updated data inside the NSMutableDictionary is not being written back into the NSUserDefaultsController, only when it is created is it added into the user defaults controller....

What is the correct way to implement this kind of bindings connection? I could easily make some glue code to resolve this issue but it wouldn't be as nice as what I'd expect bindings to be capable of..

Regards,
Samuel
_______________________________________________

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


  • Prev by Date: Re: CAOpenGLLayer
  • Next by Date: Read jpeg comments from file?
  • Previous by thread: RE: Problem with Grouping the rotated object
  • Next by thread: Read jpeg comments from file?
  • Index(es):
    • Date
    • Thread