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.
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today