• 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
Re: Trapping insert nil value into dictionary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trapping insert nil value into dictionary?


  • Subject: Re: Trapping insert nil value into dictionary?
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 17 Oct 2003 02:05:33 -0400

On Oct 17, 2003, at 12:59 AM, Ben Kennedy wrote:

On 17 10 2003 at 9:53 pm -0400, Ambroise Confetti wrote:

I've never tried it myself, but you could use +[NSObject poseAsClass:].
Make a subclass of NSCFDictionary that overrides setObject:forKey: and
goes through a piece of code only if the object argument is nil (then
you can break there), and as early as possible in you application's
code, add

[[MyNSCFDictionarySubclass class] poseAsClass:[NSCFDictionary class]];

Thanks for the idea Ambroise. However, I'm having trouble doing this...
because I can't find a definition of NSCFDictionary anywhere. PB of
course complains, because it won't let me subclass what it doesn't know about.

I've grepped /System/Library and /Library for NSCFDictionary and no .h
files are found.

I've tried subclassing NSMutableDictionary for the hell of it, and as I
expected, nothing happens (it's not the same class, obviously).


NSCFDictionary isn't a public class.. it's part of the NSDictionary class cluster.

If I had to make a guess, I'd say that they've got something messed up in their preferences for the app, or in some settings they're attempting to load.. do you store anything in Application Support?

So, if you get them to send those to you, you should be in better shape to find the problem.. The best way to find this is to run under GDB...

If not, are there crash logs on the client's machine? I think it'll depend on the version of the OS they're running.

And you may do this in many places in your code, but most of those aren't probably being called before the crash occurs, so you should be able to narrow it down further.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Trapping insert nil value into dictionary?
      • From: "Ben Kennedy" <email@hidden>
References: 
 >Re: Trapping insert nil value into dictionary? (From: Ambroise Confetti <email@hidden>)
 >Re: Trapping insert nil value into dictionary? (From: "Ben Kennedy" <email@hidden>)

  • Prev by Date: programmatic interface changes
  • Next by Date: Re: Safari and Google-like toolbars
  • Previous by thread: Re: Trapping insert nil value into dictionary?
  • Next by thread: Re: Trapping insert nil value into dictionary?
  • Index(es):
    • Date
    • Thread