Re: How to send parameter during launch time
Re: How to send parameter during launch time
- Subject: Re: How to send parameter during launch time
- From: Ondra Cada <email@hidden>
- Date: Wed, 14 Nov 2001 17:29:23 +0100
Fei,
>
>>>>> Fei Li (FL) wrote at Wed, 14 Nov 2001 09:14:11 -0700:
FL> I need to send one parameter to an application when I launch it from
FL> another application.
I guess for this a plain old command line argument would be the best way.
If you stick to the "-<name> <value>" pattern, you can read such arguments
easily anywhere using NSUserDefaults' stringForKey: method.
Incidentally, (not recommended, but possible if you really need that) you
even can change your main function and decode arguments _before_
NSApplicationMain gets called.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc