Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No PARAMETER statement is found
Message
From
05/05/1999 09:17:23
 
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00214951
Message ID:
00215301
Views:
46
>>>Hi,
>>>
>>>I am a MM user, and I beleive the documentation is refering to the fact that you can send parameters to the application object or a form object. Which section did you read this in the documentation so I can have a look. By the way, do not modify the setup or main program, despite the advise you have heard from elsewhere. These programs were never meant to be modified and are integral parts of the framework.
>>>
>>>Jim Weil
>>
>>Jim,
>>
>>Version 4.1 of the Developer's Guide on Page 49, they talk about "Passing Parameters to the Application" when running a compiled .exe from Windows or DOS. My understanding of the syntax would then be:
>>
>>c:\myDir\myApp.exe parm1
>>
>>When I try this I get the error. Any suggestions would be appreciated.
>>
>>Kind Regards,
>>
>>Mat
>
>Mat,
>
>My original assumption was correct. You can pass the application object a parameter, but the parameter is really a global variable that is eventually released after the application starts. What you need to do is trap the the value of guParameter and store it in a property of the application object. As the documentation says, a good place to do this would be in the PreInitHook method.
>
>example: this.cMyparm = guParameter
>
>Since I have never actually done this, I don't know the right syntax for passing the parameter in run statement of the exe. After reading the setup code, there is an lParameters statement, but the main program is called first. There is no lParameters statement there, and no code for passing the setup program any parameters. This is a question that needs to be addressed by Kevin. Either we are missing something or Kevin needs to modify the framework.
>
>Hope this helps.


I just realized that the main program is only neccessary to setup the correct pathing for the setup program when running the .prg directly. Try setting the setup.prg as main in the project, recompiling your exe, and then running your exe with the parameter. Everything should work as expected.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform