Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refering to objects
Message
De
20/12/1999 17:17:34
 
 
À
20/12/1999 16:50:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00306427
Message ID:
00306460
Vues:
29
>Hi David,
>
>>I want to refer to a value of a control in a form from a program by using the following code.
>>resphead.comp_code.value
>>resphead is the form file name and comp_code is the name of the control on the form. If the form is modal everything works fine. But if the form is modeless Foxpro can't evaluate it. Why?
>
>What is your DO FORM? Try using the NAME and LINKED clause of DO FORM to create an object reference for you:
>
>DO FORM Forms\RespHead NAME resphead LINKED
>
>And make sure the variable doesn't go out of scope.
>

Neither the NAME clause, NOR the LINKED clause should be necessary here. VFP creates a variable with the name of the form when you issue your DO FORM (unless there is another instance of the form running, in which case VFP creates some other variable).

The LINKED clause will do nothing but cause the form to release when the variable created is released.

David's problem more likely lies in where/ when he is trying to reference the form by name.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform