Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Losing Public Variables When Form Runs
Message
From
18/06/1999 04:57:34
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00231160
Message ID:
00231261
Views:
19
>Have you tried the following before the scatter? :
>
>__pstring = 'Public __pstring'
>for i = 1 to fields('myalias')
> __pString = __pstring + ',' + field(i)
>endfor
>&__Pstring
>
>Glenn

my routine is very similar except that I need the memory variables (m.whatever) explicitly declared and I'm declaring each one within the loop rather than building a string like yours which I can see is a more elegant solution.

FOR M=1 TO FCOUNT()
PUBVAR='M.'+FIELD(M)
PUBLIC &PUBVAR
ENDFOR

one way or another, they are being declared public and then getting lost.

Harry
Previous
Reply
Map
View

Click here to load this message in the networking platform