[Mono-osx] Passing command line paramenters to a MonoMac app
s_lessard at yahoo.com
Tue May 17 14:01:14 EDT 2011
Are you correctly invoking your MonoMac application in a way that will pass command line arguments to your application?
There are only two ways I know of to pass command line arguments to an application on OS X:
1. /Applications/MyMonoMacApplication.app/Contents/MacOS/MyMonoMacApplication arg1 arg2 arg3
2. open -a MyMonoMacApplication --args arg1 arg2 arg3
The second option is only available on OS X 10.6 and higher.
From: Maxi Combina <maxi.combina at passwordbank.com>
To: mono-osx at lists.ximian.com
Sent: Monday, May 16, 2011 5:54 AM
Subject: [Mono-osx] Passing command line paramenters to a MonoMac app
is it possible to pass command line paramenters to a MonoMac app?
In Main(string  args) method I only get 1 paramenter: the executable name.
I was poking with the generated scripts and they do some trickery with MONO_ENV_OPTIONS to launch the app... and no parameter is added to this var.
I even hardcoded some stuff (to check) and got the params in Main()... but in my overriden version of AppDelegate.FinishedLoading() I have no parameters in NSProcessInfo.ProcessInfo.Arguments.
What am I doing wrong? Which is the correct way to provide command line arguments to a MonoMac app?
Cell:+1 408 300 3614
Tel: +1 408 524 1579
440 N. Wolfe Road. Sunnyvale. CA. 94085. USA
This message and its attachments are sent from PasswordBank, Inc. and may contain information that is
confidential. If you are not the intended recipient, you are prohibited from printing, copying, forwarding or
saving them. Please delete the message and attachments without printing, copying, forwarding or saving
them, and notify the sender immediately. Message transmission is not guaranteed to be secure.
Mono-osx mailing list
Mono-osx at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx