Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running Code from a GrandParent Method
Message
From
04/06/2003 19:11:38
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00792906
Message ID:
00796453
Views:
19
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...
Previous
Reply
Map
View

Click here to load this message in the networking platform