Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 6 vs VFP 9 GotFocus() method
Message
 
 
To
16/08/2005 19:50:04
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01041458
Message ID:
01041773
Views:
25
>
>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
>
Fabio,

Thank you very much for the explanation and the sample code.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform