Re: Opening an external file in a external application
Re: Opening an external file in a external application
- Subject: Re: Opening an external file in a external application
- From: John Love <email@hidden>
- Date: Thu, 14 Aug 2008 15:54:00 -0400
workSpace = [NSWorkspace sharedWorkspace];
success = [workSpace openURL:absoluteURL];
activates Excel .. what do I need to add to re-activate my Cocoa
app .. "activate me" was terribly easy with AppleScript.
NSApplication has methods to active your application.
found it ... thanks!
[NSApp activateIgnoringOtherApps:YES];
... now back to (1,2,3) above
John Love
Touch the Future! Teach!
Whoops ... almost ... activateIgnoringOtherApps momentarily activates
my cocoa app. However, the application, Excel, keeps activating
itself until it is the front application.
So, I guess what I really need is a technique to determine when the
app, Excel, is completely finished coming to the front and then
calling activateIgnoringOtherApps.
I really don't know how to do this because this "smells" of having to
interrupt Cocoa's main event loop and that is a definite no-no.
Maybe its a matter of asking Excel to notify "me" when it completes
its startup. NSNotification??
_______________________________________________
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