Re: Using performSelector: on super
Re: Using performSelector: on super
- Subject: Re: Using performSelector: on super
- From: James Bucanek <email@hidden>
- Date: Tue, 5 Aug 2008 13:31:22 -0700
I. Savant <mailto:email@hidden> wrote (Tuesday,
August 5, 2008 12:39 PM -0400):
There is no such thing as a "private" method in Objective-C. The @private,
@protected, @public keywords only work on instance variables. So if the
super class implements -close, there should never be anything stopping your
subclass from simply calling [super close].
In this case, [super close] and [self close] are the same thing.
Because you never overrode the -close method in your subclass, it
doesn't matter, but if you ever do decide to override -close in your
subclass, all the parts where you call [super close] will be broken.
The OP did override -close in their subclass and were attempting
to call [super close] from the subclass' -close method. The OP
stated that they couldn't simply use [super close] because
-close was "private," which didn't make any sense to me.
--
James Bucanek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden