Re: Calling original method implementation from category
Re: Calling original method implementation from category
- Subject: Re: Calling original method implementation from category
- From: j o a r <email@hidden>
- Date: Mon, 25 Apr 2005 13:34:44 +0200
On 2005-04-25, at 13.09, Stephane Sudre wrote:
Do you have any reference available explaining that you can override a
method with a category?
The documents I have read always use the terms: add a method, extend a
class, etc.
On page 70 in the ObjC PDF you can, among other things, read that that:
"The methods added in a category can be used to extend the
functionality of the class or override methods the class inherits. A
category can also override methods declared in the class interface.
However, it cannot reliably override methods declared in another
category of the same class."
And what they warn about is that the loading order of categories is not
defined / difficult to predict, so if you have several categories
defining / overriding the same method, it will be difficult /
impossible to know which one that is going to be used.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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