Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make Memory variables use Private Data Sessions
Message
From
13/11/2001 06:48:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00580254
Message ID:
00580796
Views:
37
Form properties are always local to the form - you don't need any specific declaration. Different instances of the form will have separate copies of the properties.

If you mean local variables, these are declared in a method, and go out of scope as soon as the method finishes.

Hilmar.

>Mike, thanks for your assistance here and it gives me pointers.
>
>
>Just one thing thats puzzling me:-
>If I Make Properties Local to a screen, they are treated separately and dont interfere with a second instance of the same screen at the same time ..right ?
>
>If I make all the Memory variables lcoal,by looping around every field in a particular file, will these memory variables not then be local to the screen and not interfere with a second instance. If this is the case, I should not need to set up a Screen object to hold the memory variables ?
>
>
>Regards,
>
>Gerard
>
>
>
>
>
>>>Could you give me some pointers as to how forms could be fixed automatically.... i Dont want you to write the code but a few pointers would be helpful !!!
>>
>>First of all, you need to create a list of every form that needs to be changed. Hopefully, you can just do an ADIR(aSelObj, 'source\*.scx') or something similar.
>>
>>Then, run through the array, and do something like (stress "like"):
>>
>>
modify form laForms[lnI, 1] nowait
>>
>>aselobj(aForm)
>>
>>* use the aform[1] object and scan through every child object, looking for a controlsource property, and setting it appriatly.
>>for each loControl in aForm[1].controls
>>   loControl.controlsource = 'thisform.oRecord.' + strtran(loControl.ControlSource), 'm.', '')
>>endfor
>>
>>* Use the keyboard to save the form
>>keyboard '{CTRL+W}'
>>
>>Shoudl make quick work of your forms (you might want to back them all up first :-)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform