Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Initializing a Variable in a form
Message
From
10/04/2004 20:45:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
10/04/2004 19:19:39
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00893560
Message ID:
00893871
Views:
32
OK.

I'd like to point out that rather than using MEM19 and MEM20 as public memvar names, you could have used gdFromDate and gdToDate.

>Mike:
>
>OK, I think we should let this one go.
>
>I actually already have the bad habit of creating about 30 memory variables as public in my startup code. These would have names MEM1, MEM2, MEM3 etc.
>I know when I use these that I have to check within the code of the form if a variable called MEM.. is already being used. And I put notes in the Init of the form explaining the purpose of each MEM.. variable.
>
>This process has actually served me well even though it is not standard practice. The advantage to me is that these variables can be used from Form to Form. e.g. suppose I create a file name for my Print to File Filename. Suppose the File Name is created in one form and then I put up another Form to tell the user the File Name. Then I want to use that form to pump out the print file. A public variable allows me to refer to and use that variable in multiple screens.
>
>A better example is a Date Range Screen. I have all my date range screens based on MEM19 as the start date and MEM20 as the end date. The user sets the Date Range in a Calendar Screen and then returns the values to the production screen. It would be pretty hard to make this work without Public Variables.
>
>Anyway, I do not plan to make any submission to the Wish List on this because it looks like I am the only person who would benefit. So I am going to forget this.
>
>Mike Smith
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform