Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running Code from a GrandParent Method
Message
 
To
26/05/2003 20:01:00
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:
00792908
Views:
10
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...


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform