Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Initializing a Variable in a form
Message
De
10/04/2004 20:45:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
10/04/2004 19:19:39
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00893560
Message ID:
00893871
Vues:
27
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform