Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:
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: Robert Tillyard <email@hidden>
- Date: Mon, 17 Mar 2008 17:06:13 +0000
If you're looking fot the equivalent of argc/argv you might be looking
for...
NSProcessInfo *procInfo = [NSProcessInfo processInfo];
NSArray *args = [procInfo arguments];
Regards, Rob.
On 17 Mar 2008, at 16:56, Ryan Chapman wrote:
Hi all,
I have an application that uses NSWorkspace
openFile:withApplication: to launch another application:
[[NSWorkspace sharedWorkspace] openFile:@"/tmp/test.mp3"
withApplication:@"/Applications/
MaxPostProcessing.app"]
In MaxPostProcessing.app, how can I determine the file that was the
parameter passed to openFile: ??
I've tried using the arguments (argv) passed into main(), but only
see "-psn_0_188462" as argv[1].
I also tried NSNotificationCenter, but am not seeing any output from
my observer method obsMethod:(id)aNotification
Can someone point me in the right direction?
Thanks alot!
-Ryan
_______________________________________________
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