FROM : Domain Administrators
DATE : Thu Oct 31 19:29:01 2002
Hi,
I've been playing around with NSUserDefaults. And I do have them
working as they should. But the thought occurred to me that with a
lot of user prefs to set, and a lot of target/actions going on, it
might be more efficient to wait with the saving of the defaults
until program exit.
This does not work - at least not for me - and I am at a loss as to
why. I have tried (successfully) to catch a number of things "on the
way out" such as applicationShouldTerminate,
applicationWillTerminate, windowShouldClose, windowWillClose, and I
have verified that this code is working - yet if I put the defaults
save code there, it doesn't bite.
The app I am using is not multi-threaded - it's just a
straightforward Cocoa-based app.
The documentation on NSUserDefaults is sparse, so if anyone has a
clue, I would be much obliged.
Cheers,
Rick Downes
PS. Thanks for all the great stuff you publish in here. /R
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
DATE : Thu Oct 31 19:29:01 2002
Hi,
I've been playing around with NSUserDefaults. And I do have them
working as they should. But the thought occurred to me that with a
lot of user prefs to set, and a lot of target/actions going on, it
might be more efficient to wait with the saving of the defaults
until program exit.
This does not work - at least not for me - and I am at a loss as to
why. I have tried (successfully) to catch a number of things "on the
way out" such as applicationShouldTerminate,
applicationWillTerminate, windowShouldClose, windowWillClose, and I
have verified that this code is working - yet if I put the defaults
save code there, it doesn't bite.
The app I am using is not multi-threaded - it's just a
straightforward Cocoa-based app.
The documentation on NSUserDefaults is sparse, so if anyone has a
clue, I would be much obliged.
Cheers,
Rick Downes
PS. Thanks for all the great stuff you publish in here. /R
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
| Related mails | Author | Date |
|---|---|---|
| Domain Administrat… | Oct 31, 19:29 | |
| j o a r | Oct 31, 22:06 | |
| Domain Administrat… | Oct 31, 22:53 |






Cocoa mail archive

