Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make Memory variables use Private Data Sessions
Message
 
To
15/11/2001 12:33:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00580254
Message ID:
00582231
Views:
49
Jim,
The Addproperty sounds interesting.

What I meany by 'Private' to the form was that it will act like a 'private data session' for files .

In other words, if I set up M.Cusref and M.Cusname as properties using Addproperty on a form, and I then have two instances of the form open on a screen at the one time, I assume (hope) that data in these properties will be completely indepependent .

Regards,

Gerard





>Gerard,
>
>Check out the AddProperty method. It should do what you want. I think this is VFP6 and later. The Help doesn't state a limit, but there *may* be one.
>
>As to private to the form, I'm not sure what you mean. Since a property has to be hierarchically addressed, it's sort of 'private' intrinsically.
>
>good luck
>
>Jim Nelson
>
>>Is there a way to dynamically, at run time, create Properties and make them private to the form ?
>>
>>If this is possible, I could cycle through each relevant file, and make each field a Property of the form.
>>
>>Regards,
>>
>>Gerard
>>
>>
>>
>>
>>
>>>Gerard,
>>>
>>>If you do that, each variable will be local to each method, rather than to the form. IOW, if you have variable x in the init() and in the when() methods, they will not be the same variable.
>>>
>>>>
>>>>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 ?
>>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform