• 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: Using CLI arguments in controller (scoping?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using CLI arguments in controller (scoping?)


  • Subject: Re: Using CLI arguments in controller (scoping?)
  • From: Damien Bobillot <email@hidden>
  • Date: Sat, 13 May 2006 10:58:27 +0200


Mike Blaguszewski wrote :

On May 12, 2006, at 4:37 PM, Andrew Pouliot wrote:

I'm trying to get options specified on the command line to be visible in my controller class

-[NSProcessInfo arguments]

Also, be aware that launching from the Finder will pass the process serial number as an arg, so you'll probably need to handle that case.

There's another solution : if you have an argument like "-Some" "thing", the Some element of NSUserDefault will get the value "thing". It allows you to store this argument in your application's preference property list, and override it when you need by specifying it on the command line.


--
Damien Bobillot

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Using CLI arguments in controller (scoping?) (From: Andrew Pouliot <email@hidden>)
 >Re: Using CLI arguments in controller (scoping?) (From: Mike Blaguszewski <email@hidden>)

  • Prev by Date: Re: Subviews becoming blurry or "chopped up"
  • Next by Date: Re: Vertically-expanding NSTextField
  • Previous by thread: Re: Using CLI arguments in controller (scoping?)
  • Next by thread: Re: Using CLI arguments in controller (scoping?)
  • Index(es):
    • Date
    • Thread