Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6 vs VFP 9 GotFocus() method
Message
De
16/08/2005 19:50:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01041458
Message ID:
01041509
Vues:
27
>>>>Try
		TextBox::GotFocus
>>>>                NODEFAULT
>>>>
>>>
>>>Thank you very much, Sergey. Your suggestion, adding NODEFAULT works. The downside now is that I have to copy the code from the top parent class and put it right before NODEFAULT, for every textbox where I want to implement this code. I thought by VFP 9 VFPT would have this fixed.
>>
>>This is not necessary.
>
>Fabio,
>
>How else would I make the code in the GotFocus() method from the parent class to work in the child class if the child class has NODEFAULT code?

In Child Class you should have:
Code1
 dodef() && === ParentClass::GotFocus
Code2
In ParentClass
IF ..Select...
   ParentClass(=BaseClass)::GotFocus
   NODEFAULT
ENDIF
NODEFAULT refers only to the Baseclass, and it means that at the exit
of GotFocus VFP doesn't call TextBox::Gotfocus (you see him/it putting a message in Message())
and it doesn't produce all the gotFocus's Leaning events (MouseDown)

In VFP6 there was a bug and the second default TextBox::Gotfocus it interrupted the events,
in VFP9 this TextBox::Gotfocus regenerates the events Message/MouseDown.

NODEFAULT is a Flag, and you can have put in any point/level of the method Gotfocus.

Then, the sequence WITH CLICK is:
Code1
 dodef() && ParentClass::GotFocus
 IF ..Select...
   ParentClass(=BaseClass)::GotFocus
   fire This.Message
   NODEFAULT
 ENDIF
Code2

fire This.MouseUp
( because Click is produced by MouseUp 
( a NODEFAULT on MouseUp not fire Click
fire This.Click  
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform