• 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 popup button to User Defaults 'sometimes' doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding popup button to User Defaults 'sometimes' doesn't work


  • Subject: Binding popup button to User Defaults 'sometimes' doesn't work
  • From: Arthur C. <email@hidden>
  • Date: Thu, 25 Oct 2007 20:31:18 +0200
  • Importance: Normal

This is a very strange thing. I have a popup button on my interface of which the selectedValue is bound to the shared user defaults.
In my code I observe the shared user defaults, as usual:

[[NSUserDefaultsController sharedUserDefaultsController] addObserver: self forKeyPath: @"values.minXAxis" options: NSKeyValueObservingOptionOld  context: nil];
When I run the app, sometimes the binding does not work. This means that a new value (number) is selected from the popup list, and shows in the box, but the value is not updated in the user defaults. I checked it, and indeed, after quit/restart, the old value still shows. Of course, the observeValueForKeyPath is not called.
The problem occurs about 1 out of 10 times for most of the values, and about 9 out of 10 times for the downmost value from the list.

I have no clue what's going wrong here... anyone had something like this before?


Thanks for your time,

Arthur C.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________

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: starting cocoa in different thread
  • Next by Date: custom Cell tracking in NSTableView
  • Previous by thread: Re: starting cocoa in different thread
  • Next by thread: custom Cell tracking in NSTableView
  • Index(es):
    • Date
    • Thread