Synchronous application launch
Synchronous application launch
- Subject: Synchronous application launch
- From: Ray Ruvinskiy <email@hidden>
- Date: Thu, 2 Oct 2008 17:12:15 -0400
I'm having difficulty synchronously launching an application, as
documented at the bottom of http://developer.apple.com/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/chapter_2_section_6.html
. I've attempted using both -[NSWorkspace
launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier
:] and LSOpenApplication, without specifying NSWorkspaceLaunchAsync or
kLSLaunchAsync, respectively (specifically, passing 0 for the flags).
The application launched is a Cocoa application, and I trap it in gdb
by starting gdb with the "--waitfor <ProcessName>" switch. I have
verified that control does not return to the caller before
NSApplicationMain is called by placing a breakpoint in the called
application. However, control is returned after that point and before
I reach awakeFromNib and applicationWillFinishLaunching. If I place a
breakpoint in awakeFromNib, the dock icon continues bouncing, but
LSOpenApplication has already returned. This seems to contradict the
documentation, which seems to imply that the fact that the dock icon
is bouncing should mean that the application has not finished
launching and that therefore LSOpenApplication should continue blocking.
Is this behaviour expected, is this a bug, or am I simply doing
something wrong? I am using Mac OS X 10.5.4 on a Core 2 Duo Mac Mini.
Thanks,
Ray
_______________________________________________
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