Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Kickin around memory variables?
Message
De
24/05/2001 16:12:03
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00510941
Message ID:
00511180
Vues:
18
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform