• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Opening an external file in a external application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Opening an external file in a external application
      • From: Nate Weaver <email@hidden>
References: 
 >Re: Opening an external file in a external application (From: John Love <email@hidden>)
 >Re: Opening an external file in a external application (From: Shawn Erickson <email@hidden>)
 >Re: Opening an external file in a external application (From: John Love <email@hidden>)

  • Prev by Date: Re: Why does Core Data retain an object when one of that object's attributes is changed?
  • Next by Date: Re: Opening an external file in a external application
  • Previous by thread: Re: Opening an external file in a external application
  • Next by thread: Re: Opening an external file in a external application
  • Index(es):
    • Date
    • Thread