• 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: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:


  • Subject: Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 17 Mar 2008 12:37:41 -0700


On 17 Mar '08, at 12:00 PM, Ryan Chapman wrote:

Is there any way to get this information from within a command-line utility?
In my case, I have a command-line utility wrapped up in an application bundle, so I
really don't need any GUI stuff, but I thought I could use the Cocoa classes
to get the filename sent without launching a GUI.

You need to register AppleEvent handlers to get the open-document event when your process is launched. If you don't have NSApplication doing it for you, then you need to use NSAppleEventManager (which is in Foundation) to set up handlers and process the event.


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication: (From: Ryan Chapman <email@hidden>)

  • Prev by Date: Re: Apple Events and automatic AutoReleasePool managment
  • Next by Date: CoreData: Incompatible model configuration problem...
  • Previous by thread: Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:
  • Next by thread: NSPanel mimic menu behavior
  • Index(es):
    • Date
    • Thread