Re: Calling original method implementation from category
Re: Calling original method implementation from category
- Subject: Re: Calling original method implementation from category
- From: Georg Tuparev <email@hidden>
- Date: Mon, 25 Apr 2005 14:52:41 +0200
On Apr 25, 2005, at 2:12 PM, Axel Andersson wrote:
I think the problem here stems from you overriding -domain in a
category, and then, later, assuming class_getInstanceMethod() will
return the original -domain. It will, in fact, return your overridden
method. You need to name your selector something else in order to be
able to hold on to the old method. Here's some code I use for this,
with your NSError category at the end:
[...]
I would like to use the same selector in my category. Otherwise there
is no point running through all this pain and instead of the code you
are suggesting I can just type:
- (NSString *)seDomain { return [self domain]; }
:-)
Georg Tuparev
Tuparev Technologies
Klipper 13
1186 VR Amstelveen
The Netherlands
Mobile: +31-6-55798196
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden