Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make Memory variables use Private Data Sessions
Message
De
15/11/2001 23:37:12
 
 
À
15/11/2001 13:13:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00580254
Message ID:
00582554
Vues:
57
Hi Steve,
The object created by SCATTER NAME has no properties at all other than the field names. So having a field "Name" works ok.
As far as I know every other Fox object has a "name" property.

>Gerard,
>
>There is more than one way to do this. I would not create a property on the form for each field in the table. I would create a property on the form that has an object, then I would have a property within that object for each field.
>
>One method, as you have been told, is addproperty(). Another one, which I like for this sort of thing, is the SCATTER NAME command.
>
>Add a property to the form, and call it oTable1.
>
>In the load of the form:
>
>
>select table1
>scatter name this.otable1 blank
>
>
>Now, you have an object that is contained within the form, and this object has a property for each field in the table. If you have this form opened more than one time, these objects will not conflict with each other.
>
>Now, you can easily put data from the table at any time like this, and put the data back to the table (or view, for that matter), using the GATHER NAME command.
>
>scatter name this.otable1
>
>
>Word of warning: It may not be safe to have a field by the name of "name". I think it may wreak havoc with this method, or the addproperty() method.
>
>HTH,
>
>
>>Is there a way to dynamically, at run time, create Properties and make them private to the form ?
>>
>>If this is possible, I could cycle through each relevant file, and make each field a Property of the form.
>>
>>Regards,
>>
>>Gerard
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform