Re: call super class method
Re: call super class method
- Subject: Re: call super class method
- From: Ondra Cada <email@hidden>
- Date: Wed, 21 Dec 2005 19:41:24 +0100
William,
On 21.12.2005, at 18:42, William Turner wrote:
Is there a way in Objective C to invoke - from outside the class -
the base class method rather than the subclass?
In other words, I'm not talking about using the "super" keyword
inside the class.
Yup: get the IMP from the (super)class and call it directly with the
target object.
Beware, though, that it breaks encapsulation and may thus lead to
grave and hard-to-find problems.
Alternatively, is there a way to prevent subclasses from overriding
methods in the base class?
Nope.
---
Ondra Čada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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