Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCATTER MEMVAR MEMO making me crazy
Message
From
04/06/2001 13:10:10
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00514676
Message ID:
00514686
Views:
17
>It's as if I never RELEASEd the variables from Form1. How can this happen?
>But since I never did a GATHER the records were not replaced with the wrong data and no data was damaged, corrupted or lost. But it's showing me the wrong record on the wrong form. The same thing happens in reverse if I start with Form2 and go to Form1. What I am doing wrong? Wouldn't SELECT table1, SCATTER MEMVAR MEMO, followed by SELECT table2, SCATTER MEMVAR MEMO, overwrite the memory variables from table1 with those from table2?
>
>Note - I know about the SCATTER NAME command which would fix this problem, but I am not allowed to use it and I am limited to SCATTER MEMVAR MEMO commands on these two forms.
>

The problem is that variables you declare in a method of a form are scoped to that method. Your real problem is that once you leave the Init method of either form, the variables you created with SCATTER MEMVAR go out of scope. If your form still shows the values, it's because you haven't refreshed it.

Why are you using SCATTER at all here? Why not use buffering and bind directly to the fields?

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform