NSStatusItem with agent
NSStatusItem with agent
- Subject: NSStatusItem with agent
- From: Denis Merakhovich <email@hidden>
- Date: Thu, 19 Nov 2009 17:09:27 +0200
Hi
I am developing launch agent which creates NSStatusItem. When I am launching
my agent by myself using "launchctl load com.company.MyAgent.plist" then I
dont have any problem, I see NSStatusItem in menu bar and I can set focus on
it. If I put my agent to /System/Library/LaunchAgents and restart computer,
then after restart I cant set focus( I am clicking on it) on my
NSStatusItem. All other functionality of my agent is working. This is how I
create my NSStatusItem:
g_autoReleasePool = [[NSAutoreleasePool alloc] init]; // pool is created
NSApplicationLoad();
// Get a status item.
NSStatusBar *bar = [NSStatusBar systemStatusBar];
NSStatusItem* theItem = [bar
statusItemWithLength:NSVariableStatusItemLength];
[theItem retain];
[theItem setTitle: NSLocalizedString(@"Tablet",@"")];
[theItem setHighlightMode:YES];
Am I doing something wrong?
Thanks
_______________________________________________
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