Re: +poseAsClass and instance variables
Re: +poseAsClass and instance variables
- Subject: Re: +poseAsClass and instance variables
- From: Marco Scheurer <email@hidden>
- Date: Fri, 22 Feb 2002 17:55:10 +0100
On Friday, February 22, 2002, at 05:33 pm, Darrin Filer wrote:
Is there anyway around the limitation that classes can't have instance
variables when posing as another class? For my purposes, categories
aren't suitable since I need to ensure that certain methods are
overridden.
You can override methods in categories, just not easily use the original
implementation. But on the over side, you cannot add instance variables
in categories either.
One solution is to store your additional variables in a (static)
NSDictionary, using the instance pointer as the key.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
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.