• 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: exception in class derived from NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exception in class derived from NSMutableDictionary


  • Subject: Re: exception in class derived from NSMutableDictionary
  • From: Sherm Pendley <email@hidden>
  • Date: Wed, 30 Jul 2003 15:32:30 -0400

On Wednesday, July 30, 2003, at 2:03 PM, Robert G Palmer Jr wrote:

I guess it's a grey area. I have a collection of sensors. If I say it is a "has-a" relationship, then I'll be writing pass through methods for every dictionary call I want - except the two special ones I have shown.

I agree with what several folks here have said - it sounds like the best way to do what you want is to use a category to add your two special methods to NSDictionary.

Having said that, it wouldn't be all that difficult to do what you're describing above. You wouldn't need to individually write a bunch of pass-through methods; just override NSObject's methodSignatureForSelector: and forwardInvocation: methods, and forward any messages your object doesn't understand to the dictionary object.

sherm--
_______________________________________________
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.

References: 
 >Re: exception in class derived from NSMutableDictionary (From: Robert G Palmer Jr <email@hidden>)

  • Prev by Date: Learning Cocoa
  • Next by Date: Re: What's this error mean
  • Previous by thread: Re: exception in class derived from NSMutableDictionary
  • Next by thread: Re: exception in class derived from NSMutableDictionary
  • Index(es):
    • Date
    • Thread