Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclass command button
Message
From
11/06/2003 13:28:50
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00798492
Message ID:
00799036
Views:
34
Esparta,

Since we are hashing out some details of NODEFAULT...

In a custom method, or in the click() method of a button, NODEFAULT is not necessary at all...NODEFAULT is only needed in cases where there is code to execute in the VFP baseclass, such as in the KEYPRESS() method.

>If you have a execute your class after your command , paste the command dodefault() in your event.
>Dodefault() - > Execute a cod of class
>Nododefault() -> Not Execute

>
>FYI, It must be NODEFAULT without parenthesis... if you code with parenthesis in VFP8 you'll get an Error (not in previous version).
>
>oC = CREATEOBJECT("MyLegacy")
>OC.ShowMe()
>DEFINE CLASS myLegacy as myCustom
>  PROCEDURE ShowMe
>     NODEFAULT() &&Later, use it without parenthesis...
>     MESSAGEBOX("New Hola World")
>  ENDPROC
>ENDDEF
>
>DEFINE CLASS myCustom as Custom
>   PROCEDURE ShowMe
>      MESSAGEBOX("Hello World")
>   ENDPROC
>ENDDEFINE
>
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform