• 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: Choosing an instance of a running app to open file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choosing an instance of a running app to open file


  • Subject: Re: Choosing an instance of a running app to open file
  • From: David Remahl <email@hidden>
  • Date: Sun, 23 Feb 2003 19:57:37 +0100

You can use AppleEvents (I think it is 'open' that's relevant in this case), and send them to the instance of the program that you desire.

/ Rgds, David

On Sunday, February 23, 2003, at 06:42 PM, Jeff Disher wrote:

Hello,

I am trying to write an app which needs to open documents with their default bindings sometimes. This works fine unless there are multiple running copies of the app. For example, this can happen when the user is trying a new version of app they are still running the old version of, or when they are running one copy of themselves and one as root.

I have been using NSWorkspace's openFile: method to make sure that the file is opening with the application that the user would expect but this technique breaks down here and I don't have any control over which instance will open the document.

Is there any way to send use the pid, or something, to control which instance will actually open the document?

Thanks,
Jeff.
_______________________________________________
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.

References: 
 >Choosing an instance of a running app to open file (From: Jeff Disher <email@hidden>)

  • Prev by Date: Re: NSTextView and Line Numbering
  • Next by Date: Localization and PB
  • Previous by thread: Choosing an instance of a running app to open file
  • Next by thread: Localization and PB
  • Index(es):
    • Date
    • Thread