Page 1 of 1
ProgramParameter function not working [RESOLVED]
Posted: Thu Dec 01, 2016 8:32 am
by coder14
If the program is run from PB using the compiler commandline options or from Terminal, the parameters work. But if an associated file is clicked the program is launched but not parameters are shown?
Is there some setting required for this?
Re: ProgramParameter function not working
Posted: Thu Dec 01, 2016 8:37 am
by Mistrel
Note that this feature is provided in the "Compile/Run" tab under "Run executable with:". This feature will only work when the program is run from the IDE and is meant for testing.
If you want a particular feature to persist then set it as variable that you can toggle on or off in your code.
Re: ProgramParameter function not working
Posted: Thu Dec 01, 2016 8:46 am
by Fred
Yes, program parameter are only valid from terminal. To get a double click filename, you need to implement an application delegate with the 'openFiles:' handler.
Re: ProgramParameter function not working
Posted: Thu Dec 01, 2016 9:57 am
by wilbert
Re: ProgramParameter function not working
Posted: Fri Dec 02, 2016 7:02 am
by coder14
Thanks Fred! And thanks wilbert! That works perfectly even when the instance is running. It solves my IPC problem of trying to tag the running instance with the new launching parameters.
So double runs are not allowed by default on Macs, or is it better to indicate that in the plist?