Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.