Mailing Lists: Apple Mailing Lists

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

NSUserDefaults dictionary raises exception instead of returning nil



   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:
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.