Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclass command button
Message
De
11/06/2003 13:28:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00798492
Message ID:
00799036
Vues:
33
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform