FROM : Jason Whitehorn
DATE : Mon Apr 11 16:09:54 2005
I am a newbie when it comes to Cocoa programming, and am currently
trying to figure out how command line arguments are passed to my
program.
I have a program that I am trying to associate with a specific file
type, and when I double click an associated file in Finder, I want my
program to launch and do something with the file. When I attempt to
read from argv I find something like "-psn_0_100401153" where I am use
to expecting passed arguments. All I want is the path to the passed
file. For example if I were to double click on "Test.file" on my
Desktop, I would want the string "/Users/Jason/Desktop/Test.file".
I thought that I was suppose to use NSProcessInfo to accomplish this
goal, but all the "arguments" method accomplishes is getting me the
same "-psn_0_100401153" string that I was able to get from directly
accessing argv within main.
Any help would be wonderful.
-Thanks, Jason
DATE : Mon Apr 11 16:09:54 2005
I am a newbie when it comes to Cocoa programming, and am currently
trying to figure out how command line arguments are passed to my
program.
I have a program that I am trying to associate with a specific file
type, and when I double click an associated file in Finder, I want my
program to launch and do something with the file. When I attempt to
read from argv I find something like "-psn_0_100401153" where I am use
to expecting passed arguments. All I want is the path to the passed
file. For example if I were to double click on "Test.file" on my
Desktop, I would want the string "/Users/Jason/Desktop/Test.file".
I thought that I was suppose to use NSProcessInfo to accomplish this
goal, but all the "arguments" method accomplishes is getting me the
same "-psn_0_100401153" string that I was able to get from directly
accessing argv within main.
Any help would be wonderful.
-Thanks, Jason
| Related mails | Author | Date |
|---|---|---|
| Jason Whitehorn | Apr 11, 16:09 | |
| Ondra Cada | Apr 11, 16:30 | |
| Dan Saul | Apr 11, 18:16 | |
| Finlay Dobbie | Apr 11, 23:13 |






Cocoa mail archive

