NSUserDefaults dictionary raises exception instead of returning nil
NSUserDefaults dictionary raises exception instead of returning nil
- Subject: NSUserDefaults dictionary raises exception instead of returning nil
- From: email@hidden
- Date: Sun, 4 Mar 2007 09:07:41 +0100 (CET)
- Importance: Normal
Hello all,
since the problem I explained in my last thread has evolved into
a different form, I put it a different thread. What happens now is that the
objectForKey : method (of class NSUserDefaults) is called on a valid
NSUserDefaults instance with a valid (non-nil) key, iand t raises an
exception. But according
to the documentation it should just return nil if it doesn't find the key.
(gdb) po (NSUserDefaults*) [NSUserDefaults standardUserDefaults]
<NSUserDefaults: 0x216e80>
(gdb) po GGPeggyHeaderContentKey
HeaderContents
(gdb) po [[NSUserDefaults standardUserDefaults]
objectForKey:GGPeggyHeaderContentKey]
Breakpoint 1, 0x928970e8 in -[NSException raise] ()
The program being debugged stopped while in a function called from GDB.
When the function (objc_msgSend) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call).
Single stepping until exit from function -[NSException raise],
which has no line number information.
If I probe further and "continue" in the debugger I get the message :
(gdb) continue
2007-03-04 08:55:25.296 Hardy3[495] *** -[_NSZombie forward::] not
overridden!
What is this method with double colons ?
Ewan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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