Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running Code from a GrandParent Method
Message
De
04/06/2003 19:11:38
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00792906
Message ID:
00796453
Vues:
17
Thanks.

>Hi Gavin,
>
>You need to use the scope resolution operator. ::
>
>For example:
>
>
oFrm = CREATEOBJECT('MyForm')
>oFrm.show(1)
>
>
>DEFINE CLASS MyForm as Form
>
>ADD OBJECT cmdTest as cmdChild
>
>ENDDEFINE
>
>
>DEFINE CLASS cmdGrandParent as CommandButton
>
>FUNCTION click()
>MESSAGEBOX('GrandParent')
>ENDFUNC
>
>ENDDEFINE
>
>DEFINE CLASS cmdParent as cmdGrandParent
>
>FUNCTION click()
>MESSAGEBOX('Parent')
>ENDFUNC
>
>ENDDEFINE
>
>DEFINE CLASS cmdChild as cmdParent
>
>FUNCTION click()
>** Call the GrandParent class method
>RETURN cmdGrandParent::Click()
>ENDFUNC
>
>ENDDEFINE
>
>
>Cheers,
>
>See you tomorrow night at the User Group?
>
>Andrew
>
>>Hi All,
>>
>>I have a form (VFP6) that is based on a class and within one of the forms methods I have made some code changes and need to call the DODEFAULT() of the GrandParent class. How can I do this?
>>
>>Thanks,
>>Gavin...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform