>>>>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()
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()
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