Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Kickin around memory variables?
Message
From
25/05/2001 03:08:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
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:
00511359
Views:
17
>>>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
>
Gerry,
With the way Steve creates (controlsource=m.something) variables are not private but public. For that reason I tried hard to say he needn't to declare as public but a refresh problem. He'd see variables even after closing the form in memvar list (if just walked pages w/o setting focus to boxes then only the first page set, if setfocus to all at sometime then all - I don't know the reason possibly performance consideration).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform