Re: I Never get 'self' in Obj-C
Re: I Never get 'self' in Obj-C
- Subject: Re: I Never get 'self' in Obj-C
- From: Steve Bird <email@hidden>
- Date: Mon, 5 May 2008 18:10:31 -0400
On May 5, 2008, at 5:50 PM, J. Todd Slack wrote:
Hi All,
I have the following:
statusItem = [[[NSStatusBar systemStatusBar]
statusItemWithLength:NSVariableStatusItemLength]
retain];
[statusItem setHighlightMode:YES];
[statusItem setTitle:[NSString stringWithFormat:@"%C",0x260F]];
[statusItem setEnabled:YES];
[statusItem setToolTip:@"Ring-Maker"];
[statusItem setTarget:self];
The compiler complains about self; saying: iTunesPlugIn.m:606:
error: 'self' undeclared (first use in this function)\
But I dont understand why it is complaining?
First guess:
It's not in a method of an object; it's in free-standing code.
To use SELF, you have to be in an object's method.
----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com (toll free) 1-877-676-8175
_______________________________________________
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