Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Kickin around memory variables?
Message
From
24/05/2001 16:12:03
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00510941
Message ID:
00511180
Views:
16
>>See my last reply to Cetin Basoz. I explain the pageframe GATHER problem further and how it works and doesn't work, with and without PUBLIC fieldnames in the form init.<<

I wouldn't beat myself up too much on this issue; the simple fact is that when you set a .ControlSource to "m.Something", VFP will "dynamically" create a corresponding memvar at various times if the memvar does not exist. However, in all cases, these are PRIVATE memvars and will go out of scope when the method that created them ends (eg. Init or whatever).

FWIW, here's a routine to create PUBLICs so you don't have to create them "manually":
   = Create_Publics( "< alias >" )

PROCEDURE Create_Publics
   LPARAMETER TC_Alias

   LOCAL i

   FOR m.i = 1 TO FCOUNT( m.TC_Alias )
      PUBLIC ( FIELD( m.i,  m.TC_Alias ) )
   NEXT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform