Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use an oApp object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00467798
Message ID:
00467823
Vues:
15
Because your oApp object is neither the form, nor contained in the form, you need to explicitly refer to the form by name.

FormName.myfield

or, if the form is the active form,

Screen.ActiveForm.myfield

On the other hand, personally, I'd put form validation code in the form.

Alan

>Nuno, thanks for your reply.
>
>I dont follow what you suggest.
>I have an Application Object ,based on a a Container class, which has a number of Methods, one of which is to Validate fields from my form.
>So within the Validate Method of my Oapp class, I want to refer to fields on the form:
>What is the correct way to do this:
>oApp.ThisForm.Myfield or
>This.Myfiled or
>thisForm.MyField ....
>
>I am just confused as to how to refer to the form properties from within my application class.
>
>Regards,
>
>Gerard
>
>
>
>
>
>
>>Gerald
>> That is the BaseClass of the compoment ?
>>
>> Try Setting
>> This.Myproperty = 'Abc' .....
>> or
>> This.Parent.Myproperty = 'Abc' .....
>>
>> The error that gives you is because the primary object of the class is not a Form ( maybe a Container / Custom ...).
>>
>>Nuno Brito
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform