NSService - I need a headslap
NSService - I need a headslap
- Subject: NSService - I need a headslap
- From: Steve Cronin <email@hidden>
- Date: Wed, 04 Feb 2009 02:44:51 -0600
Folks;
I have a need for a stand-alone service.
Seems like Service don't get alot of love... (Maybe that's my
problem .. but I don't think so)
To be clear here, this is a stand-alone .service type application (not
a service vended by a larger app (like Mail).
Here's what I have done:
0) built with a .service wrapper
1) Info.plist - PrinClass=NSApp; Bundle OS Type = APPL;
ExecutableFile=MyClassName; App is BackgroundOnly
1) Info.plist - Services{Menu, SendType, instance method name, and
incoming service port name)
2) No xib file
3) standard main.m
4) I have a single ObjC class whose .m looks like this
+(void)initialize { [NSApp setDelegate:self]; }
- (void) applicationDidFinishLaunching:(NSNotification *)aNote {
[NSApp setServicesProvider:self];
void NSUpdateDynamicServices(void);
}
- (void) myServiceName:(NSPasteboard *)pboard userData:(NSString
*)userData error:(NSString **)error {
.....
}
What I can't get my head wrapped around is how/when does this .service
thing get launched?
The docs seem to indicate that you can just build it as a .service,
stuff into the ~/Library/Services and you are good to go...
(These docs are more than 8 years old.... Is there any later material?)
On Tiger systems I see the service appear on the Services menu....
Not so on Leopard
(On Leopard even if I log out and back in I still do not see the
service in the menu...
But either way I never get any response. If I put in log statements I
never see any activity...
What am I overlooking? I KNOW its something silly but have mercy my
head is bloody....
Thanks for any help!!
Steve
_______________________________________________
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