• 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: "Ben Kennedy" <email@hidden>
  • Date: Fri, 17 Oct 2003 00:59:19 -0400
  • Organization: Zygoat Creative Technical Services

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

-ben

--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca
_______________________________________________
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: Don Yacktman <email@hidden>
    • Re: Trapping insert nil value into dictionary?
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Trapping insert nil value into dictionary? (From: Ambroise Confetti <email@hidden>)

  • Prev by Date: Table View drops
  • Next by Date: Setting Network Preferences Programatically - Part 2
  • Previous by thread: Re: Trapping insert nil value into dictionary?
  • Next by thread: Re: Trapping insert nil value into dictionary?
  • Index(es):
    • Date
    • Thread