Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope of variables
Message
From
13/03/1998 16:04:35
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00084372
Message ID:
00084587
Views:
28
>>I've noticed that any variables defined (specifically, with a SCATTER MEMVAR) in the Init method cannot be seen from elsewhere in a form. Is there a different place that I put declarations so that variables are seen in the rest of the form?
>>
>>Thanks!
>>David Chan
>
>David,
>
>Variables scattered from a table, behave like all other variables declared in a method - when the method goes, so do the variables.
>
>You have to use a different mind set for developing under visual as opposed to fox 2.x. The best way to put fields from a table on to a form is to use bound controls ( as you have always been told to avoid in 2.x!!). Then you have a 'memory variable' pointer to the field in the form of
>
>THISFORM.FieldName.Value
>
>If you must scatter your variables though - converted form?, scatter them before you run the form. This should only be used in modal forms - (the variables would obviously clash if you tried running the same form more than once!) - if at all :-)
>
>Hope this helps
>
>Ian

Even beetr, use form properties, as apposed to variables..
Previous
Reply
Map
View

Click here to load this message in the networking platform