Hello.
I have a really simple setup for a CocoApplet, as all it really does is install a service, which is an AppleScript, which is really run by executing an osa script.
I really plan on removing every handler there is in the AppDelegate except for did finish launching, and I plan on making that look like this:
on applicationDidFinishLaunching:aNotification try tell (load script (path to resource "main.scpt" in directory "Scripts")) to run on error errMsg number errNum if errNum is not -128 then display alert "An error occurred while running" message errMsg & " (" & errNum & ")" as critical end if end try end applicationDidFinishLaunching:
I’ll keep this method like this:
on applicationShouldTerminate:sender return current application's NSTerminateNow end applicationShouldTerminate:
(The main script already works all right, as run only, question is if I can really rip out all of the other handlers, safely, from CocoaAppletAppDelegate. It is really intended to be run directly by the user once, to register the service.
So, will it work safely on all occasions, given that the applet will be just a service provider, and can I save the CocoaAppletAppDelegate as run-only?
Thanks.
Tommy/McUsr |