Trouble with Services
Trouble with Services
- Subject: Trouble with Services
- From: Chad Armstrong <email@hidden>
- Date: Sun, 12 Jun 2005 11:57:55 -0500
Hello everyone:
I am having some problems getting my application and services to work
together nicely.
From what I understand, here is the order that particular functions
are called in when the application starts up.
init
awakeFromNib
application (called if files are dropped on application)
applicationDidFinishLaunching
called NSServices method (let's call is myServiceFunction)
My problem results in that there is some code in the
applicationDidFinishLaunching function which starts running before
the NSService-specified function is called, which is not what I'm
trying to do. I was hoping that I could set some boolean variable in
myServiceFunction to create a proper code flow in the
applicationDidFinishLaunching function.
So, here is what I'm ultimately trying to do.
If a service is called, start the application up, but do not execute
specific bits of code within applicationDidFinishLaunching, and then
execute the code within the NSService function myServiceFunction.
If the application is started normally, then it starts and does its
stuff like normal, but has no interaction with myServiceFunction.
Is there a way to move some of my code out of
applicationDidFinishLaunching, yet have it run once the application
has opened?
Is there a way to use something like a notification to check if a
Service has been called?
Best regards,
Chad Armstrong
email@hidden
_______________________________________________
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