Re: I Never get 'self' in Obj-C

2008-05-05 Thread Bill Cheeseman
on 2008-05-05 6:55 PM, J. Todd Slack at [EMAIL PROTECTED] wrote: > Does anyone have an example of how to put Obj-C (like an NSStatusItem) > in with C? When you implement a function outside of an Objective-C class, but you want the function to have access to things that are inside the class, you c

Re: I Never get 'self' in Obj-C

2008-05-05 Thread Michael Vannorsdel
Your approach is fine, just pass in a valid object for the target since self doesn't exist at that point. If you don't have an object you'll need to make an objc class and instantiate it to handle the events from the status item. On May 5, 2008, at 4:55 PM, J. Todd Slack wrote: OK, I th

Re: I Never get 'self' in Obj-C

2008-05-05 Thread J. Todd Slack
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 setT

Re: I Never get 'self' in Obj-C

2008-05-05 Thread Mark Ritchie
On 5-May-08, at 5:50 PM, J. Todd Slack wrote: The compiler complains about self; saying: iTunesPlugIn.m:606: error: 'self' undeclared (first use in this function)\ Hrm, can you show us a larger context of where this code segment is placed? I'm betting that it isn't inside an objective c met

Re: I Never get 'self' in Obj-C

2008-05-05 Thread Andy Lee
Is your code inside an Objective-C method? What are you expecting self to be? --Andy 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

Re: I Never get 'self' in Obj-C

2008-05-05 Thread Steve Bird
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",0x26

Re: I Never get 'self' in Obj-C

2008-05-05 Thread Corbin Dunn
On May 5, 2008, at 2: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]];

I Never get 'self' in Obj-C

2008-05-05 Thread J. Todd Slack
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