Re: Problem with NSUserDefaultsController

2008-09-02 Thread Keary Suska
9/2/08 11:04 AM, also sprach [EMAIL PROTECTED]: >> Some other suggestions: storing the shared defaults and controller is really >> just a waste of memory. They won't change across invocations. > > > With the overhead of Objective C messaging, isn't it more efficient > to obtain once and store th

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Mark Allan
> For what it's worth, the [sharedUserDefaultsController save:] message is still returning before performing the save, so if I send any other messages within my savePrefs method, userDefaults will still contain the old value - I'm beginning to wonder if this is a bug within NSUserDefaultsCont

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Keary Suska
9/2/08 2:37 AM, also sprach [EMAIL PROTECTED]: > For what it's worth, the [sharedUserDefaultsController save:] message is still > returning before performing the save, so if I send any other messages within > my savePrefs method, userDefaults will still contain the old value - I'm > beginning to w

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Mark Allan
I think I've fixed the the problem, thanks to an idea I had whilst reading Oleg's "Bindings - newbie question" thread. I've added a message within -init to bind my model's variable (theValue) to the appropriate value (thevalue) within the standardUserDefaults dictionary (myPrefs). Apologies fo

Re: Problem with NSUserDefaultsController

2008-09-01 Thread Brian Stern
Apparently NSUserDefaults delays its saving until the next time through the event loop, perhaps by using one of the performSelector:afterDelay calls, or something like that. Is it possible that this is what's causing your issues? I ran into this problem when trying to save user defaults at

Re: Problem with NSUserDefaultsController

2008-09-01 Thread Mark Allan
>> I've been playing around with bindings to NSUserDefaultsController in a very simple app to test saving preferences, but the [sharedUserDefaultsController save:self] method seems to return immediately without waiting for the save operation to complete. The save does actually take place,

Re: Problem with NSUserDefaultsController

2008-09-01 Thread Mark Allan
On Sun, Aug 31, 2008 at 12:13 PM, Mark Allan <[EMAIL PROTECTED]> wrote: For what it's worth, I also get these compiler warnings for the line with [sharedUserDefaultsController save:] warning: multiple methods named '-save:' found warning: using '-(void)save:(id)sender' warning: also found '

Re: Problem with NSUserDefaultsController

2008-09-01 Thread Kyle Sluder
On Sun, Aug 31, 2008 at 12:13 PM, Mark Allan <[EMAIL PROTECTED]> wrote: > For what it's worth, I also get these compiler warnings for the line with > [sharedUserDefaultsController save:] > > warning: multiple methods named '-save:' found > warning: using '-(void)save:(id)sender' > warning: also fou

Re: Problem with NSUserDefaultsController

2008-09-01 Thread Keary Suska
8/31/08 4:11 PM, also sprach [EMAIL PROTECTED]: >> I've been playing around with bindings to NSUserDefaultsController in >>> a very simple app to test saving preferences, but the >>> [sharedUserDefaultsController save:self] method seems to return immediately >>> without waiting for the save operat

Re: Problem with NSUserDefaultsController

2008-08-31 Thread Mark Allan
On 31 Aug 2008, at 17:25, Keary Suska <> wrote: 8/31/08 10:13 AM, also sprach: I've been playing around with bindings to NSUserDefaultsController in a very simple app to test saving preferences, but the [sharedUserDefaultsController save:self] method seems to return immediately without waiti

Re: Problem with NSUserDefaultsController

2008-08-31 Thread Keary Suska
8/31/08 10:13 AM, also sprach [EMAIL PROTECTED]: > I've been playing around with bindings to NSUserDefaultsController in > a very simple app to test saving preferences, but the > [sharedUserDefaultsController save:self] method seems to return > immediately without waiting for the save operation to

Problem with NSUserDefaultsController

2008-08-31 Thread Mark Allan
Hi, I've been playing around with bindings to NSUserDefaultsController in a very simple app to test saving preferences, but the [sharedUserDefaultsController save:self] method seems to return immediately without waiting for the save operation to complete. The save does actually take place, w