FROM : Sherm Pendley
DATE : Sat Dec 11 04:45:02 2004
On Dec 10, 2004, at 7:56 AM, Peter wrote:
> 1) Is there a method to retrieve application name of the running
> program itself ?
NSProcessInfo *pi = [NSProcessInfo processInfo];
NSString *appName = [pi processName];
> 2) Is it possible to get the path of the executable via Cocoa ?
> ( I know of one possiblity by getting via main(argc, argv) -->
> argv[0] by C)
id exePath = [[pi arguments] objectAtIndex: 0];
> 3) Is it possible to retrieve command line arguments via Cocoa ?
NSArray *args = [pi arguments];
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
DATE : Sat Dec 11 04:45:02 2004
On Dec 10, 2004, at 7:56 AM, Peter wrote:
> 1) Is there a method to retrieve application name of the running
> program itself ?
NSProcessInfo *pi = [NSProcessInfo processInfo];
NSString *appName = [pi processName];
> 2) Is it possible to get the path of the executable via Cocoa ?
> ( I know of one possiblity by getting via main(argc, argv) -->
> argv[0] by C)
id exePath = [[pi arguments] objectAtIndex: 0];
> 3) Is it possible to retrieve command line arguments via Cocoa ?
NSArray *args = [pi arguments];
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
| Related mails | Author | Date |
|---|---|---|
| Peter | Dec 10, 13:56 | |
| Louis Sinclair | Dec 10, 23:47 | |
| Douglas Davidson | Dec 11, 03:37 | |
| Ken Ferry | Dec 11, 03:56 | |
| Sherm Pendley | Dec 11, 04:45 |






Cocoa mail archive

