Re: cocoa and argv
Re: cocoa and argv
- Subject: Re: cocoa and argv
- From: Brian Ling <email@hidden>
- Date: Thu, 15 Aug 2002 03:36:58 -0700 (PDT)
I tried putting
char *testvar; //above the main function
testvar = argv[1]; //in the main function
however if i tried to access testvar in my controller
actions I get "testvar undeclared".
what have I missed.
>
> Save the contents of the array in a global
variable,
> which can be accessed
> from anywhere.
>
> / David
>
> > Hi,
> >
> > I seem to have a slight problem, I need to
open a
> > cocoa app from the command line, with an
argument.
> > When the app is open by:
> > myapp.app/Contents/MacOS/myapp argument
> >
> > I can access argv from the main.m main
function.
> > The problem is how can I access argv from my
> > Controller class?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.