Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which came first, Chicken or Egg
Message
 
 
To
05/10/2005 17:30:48
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01056465
Message ID:
01056530
Views:
31
Joel,

In VFP instantiation has always occurred from deepest containership to outermost containership.

It is structured this way so that when the Init of the container (ie form, page, grid etc) fires all of its internal objects have been setup and ready to go.

Unless you scatter to a PUBLIC memvar nothing is going to see a variable created in the Load() method. Why can't your controls just look at the table.fields themselves? Provided you are sitting on the correct row of the table when the form starts up the controls have access to the row. One thing that makes PUBLIC memvars bad is your form can't have multiple instances running at the same time because they'd stomp on the one memvar.

>I did not think it would.
>
>I was trying to change the color of certain text fields and some command buttons based on the data in a DBF record. The form has many of the fields of the DBF and as they change values, I was going to change colors.
>
>Normally the user hits a command button, goes out to another form and does things. When they come back to this form I was going to reset all of the colors based on their actions.
>
>So I used memvars for the fields and do a scatter memvar whenever the form is refreshed.
>
>It is NOT working. Even when I scatter memvar on the form load, the various boxes and buttons can not see the memvars when they do an INIT.
>
>I put a wait window in the various steps so I know that the scatter memvars does happen first, but the various boxes and command after that can not see the memvars.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform