Re: self
Re: self
- Subject: Re: self
- From: Clark Cox <email@hidden>
- Date: Wed, 8 Jun 2005 11:13:11 -0400
On 6/8/05, Theodore H. Smith <email@hidden> wrote:
>
> Am I right in thinking that self is a local (stack based) variable?
Yes and no. Self is actually a hidden function parameter. For
instance, the method:
-(id)foo
{
}
Is really, under the hood, a function that looks something like:
id foo(id self, SEL _cmd)
{
}
> for example the code:
>
> -(id) init {
> self = [self initSpecial];
> return self;
> }
>
> should alter everything in exactly the same way as:
>
> -(id) init {
> return [self initSpecial];
> }
Yes.
--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
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
- Follow-Ups:
- Re: self
- From: Mark Lively <email@hidden>
- Re: self
- From: "Theodore H. Smith" <email@hidden>
References: | |
| >self (From: "Theodore H. Smith" <email@hidden>) |