Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When is NODEFAULT used?
Message
De
24/04/1999 05:10:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/04/1999 10:07:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00211090
Message ID:
00211851
Vues:
40
>>>>>
>>>>>NODEFAULT is used anytime you see something strange :-). Theoretical definition is that NODEFAULT suppresses base class behaviour, which is actually means some code hidden behind the scene. The most common example: when you finish typing in textbox the focus automatically moves to the next (by tab order) controls. But you did not write code to invoke this behaviour, correct? This is exactly 'hidden'/'internal'/'base class' code. So, if you want instead to move to another controls, then it's safe to say in this control lostfocus event:
>>>>>Thisform.AnotherControl.Setfocus
>>>>>NODEFAULT
>>>>
>>>>
>>>>Would this be another example:
>>>>
>>>>Say I want to interrupt the built-in LISAG sequence (thanks to Drew). If I execute NODEFAULT at the end of the Initiate event then Show, Activate, and Gotfocus never happen. Am I right?
>>>>
>>>>Peter Robinson
>>>
>>>No, you should return .F. from Init event.
>>
>>The only problem with return .F. from the Init() is that the form won't instantiate if Init() returns .F. - if you want the form to load, set up its DE and hold in an idle until needed, you need to block the Show() event from firing (easy enough to do with the NOSHOW clause in the DO FORM.)
>
>Would not be sufficient to set Form.Left=-2000 here?

Just got me wandering if we'd get a HDTV card soon, and if 2000 will be enough. I prefer not to impose any constants (actually, I'd much rather prefer vector graphics instead of pixels - using coordinates relative to screen size is much safer than relying on resolution). To stay safe from future's resolutions, my preferrence is
form.left=-2*form.width

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform