Cocoa FBA
Cocoa FBA
- Subject: Cocoa FBA
- From: Ron Davis <email@hidden>
- Date: Fri, 17 May 2002 10:27:09 -0500
I'm a new Cocoa programmer and we've decided to do a product using Cocoa and
one part of this program is a Faceless Background App that responds to
AppleEvents.
I'm trying to get it set up and running. I've created a app and wrote a
custom main class to avoid having a NSApplication class. I was told this was
necessary since I was background only.
I created a script terminology and script suite files and put them in the
right places. But when I launch Script Editor and tell it to open the app's
dictionary, my app launches and bounces forever hanging Script Editor.
Anyone see this behavior and have an idea what could cause it?
Here's my main routine for critique:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init ];
// create my app object
MJFBA* myApp = [[MJFBA alloc] init ];
// set it as the top object in AppleScript
[[NSScriptExecutionContext sharedScriptExecutionContext]
setTopLevelObject: myApp ];
[[NSScriptSuiteRegistry sharedScriptSuiteRegistry] loadSuitesFromBundle:
[NSBundle mainBundle]];
// call NSRunLoop
[[ NSRunLoop currentRunLoop ] run ];
[pool release];
return 0;
--
Ron Davis
"Always bear in mind that your own resolution to succeed is more important
than any other thing." --Abraham Lincoln
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.