Binding popup button to User Defaults 'sometimes' doesn't work
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