Hello Scott
> You seem to be trying to find ways to use the frameworks in ways that are > not intended. Why are you not using NSApplicationMain in the normal way? > Just for the sake of my own understanding. There's nothing extraordinary i am doing there, but for example, i need to "delay" the launch of my application and registering all the observers/event taps before the "master application" starts > Two reasonable choices are: > > - A single thread, where your processing is implemented as a finite state > machine that can yield after a bit of work and return to the run loop, but > sets an NSTimer to fire in 0 seconds just before it returns. > I will try that, thank you, but just wondering if i could do the same using [NSRunLoop mainLoop], by calling -runMode:beforeDate:? Is it the same as scheduling a timer? If i could use that, what should i have specified in date? Current date? Current date+some time? what would be instead of that time? I am asking just to get the idea of that thing... > > - Multiple threads, figure out your bug with synchronization around > AppleScripts (there is no reason the library would run slower just because > you add a new thread). > I am not doing no synchronization at all, nor i need any for my application. I was thinking this is done by the framework, only because i was reading that NSAppleScript wasn't thread safe, and became so only lately. But as long as "we shouldn't care how is it built inside", i only assumed this thread safety had been provided in exchange of performance (when the apple events - this is how NSAppleScript allows the application to retrieve result value from applescript - are still received in the main thread, which suspends both threads or something). Well actially i get a general performance slowdown. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com