Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private Vars Declared in Init Scope
Message
From
17/12/2003 13:26:26
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00859506
Message ID:
00860015
Views:
24
Hi Sorin,

Yes we discussed this option (not ideal in the longterm of course, but certainly a quick workaround to get it done) and that is what I am doing now for forms with over 75 variables. It certainly cuts the conversion time WAY DOWN! Eventually we will go back to those forms and move the vars to form properties.

Thanks for contributing!
Tracy

>Hello Tracy,
>
>We all agree that using object properties is the best option, however, on conversions like this it may not be always practical.
>I know this thread has been around for a while, and I may repeat what others may have suggested already, but here is my thought;
>- Wrap each form in a PRG where you declare all the PRIVATE vars that are expected during the execution of the form. Name the prg something like ~FormName~prg. Thus each form will have a wrapper that will emulate the Setup/Cleanup sections from the FP screens.
>- In your calling programs instead of DO FORM myform, call DO myformprg which (is the wrapper that) declares the PRIVATE vars that will live throught the execution of myform., calls DO FORM and does the clean-up after the form is released.
>
>Sorin
>
>>Hi John,
>>
>>I think we all vote for form properties for the obvious reasons. The issue is more a 'temporary' one due to time and deadlines. 450 FPD26 screens to convert by January 1st to go live February 8th. Over half of the screens are multipage and require at least 150 variables (in the current configuration) so the time involved to change all vars to form properties and also the logic where every var was accessed is time consuming. Also most forms are only allowed to run once but can be called from multiple locations in the program. I think in the long run it will be entirely form properties of course but in the short term the time just isn't there to accomplish it all. This deadline has already made me rather 'brain dead' in a lot of areas :o) trying to accomplish as much as possible in day that now runs 16-18 hours of programming 7 days a week.
>>
>>Tracy
>>
>>>Dragan
>>>
>>>In the supplied code, surely a variable defined above the Createobject() will go out of scope immediately after xform.show, since that is where this procedure must end.
>>>
>>>I vote for form properties.
>>>
>>>Regards
>>>
>>>j.R
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform