Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing a form control's parent method
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00065004
Message ID:
00065017
Views:
55
>I have a container class on my form called commandbutton. The click method has the code: thisform.recAdd()
>Included in the code for Thisform.recAdd is:
>
>Thisform.commandbutton.parent.disableupdate()
>
>Disableupdate is a method of class commandbutton. But I get error 1734 - "Property DISABLEUPDATE is not found"
>
>How should I be referencing this method?

'Parent' property refer to object container and doesn't fit to your purpose. It can be two cases when you want to invoke code from Object Class (I guess this is the case).
1. If your object doesn't have own method code, i.e. Commandbutton (in Form Designer) has nothing in Disableupdate snippet, then you just call Thisform.commandbutton.disableupdate ahd get all code inherited from class.
2. If your added some new code in Form Designer, but still want to call class code, then you use '::' scope resolution operator and fire Thisform.commandbutton::disablebutton
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform