• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSUserDefaults dictionary raises exception instead of returning nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Removing formatting goo from NSRulerView subclass...
  • Next by Date: Re: NSUserDefaults won't do as it's told
  • Previous by thread: Re: Calculating the size of NSFont...
  • Next by thread: rotating an object around the center of a view
  • Index(es):
    • Date
    • Thread