Re: exception in class derived from NSMutableDictionary
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.