• 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: How to send parameter during launch time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to send parameter during launch time (From: Fei Li <email@hidden>)

  • Prev by Date: Graph out of data
  • Next by Date: Re: Weird window behavior when using LSBackgroundOnly and status bar
  • Previous by thread: How to send parameter during launch time
  • Next by thread: Re: Weird window behavior when using LSBackgroundOnly and status bar
  • Index(es):
    • Date
    • Thread