Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing form in INIT method
Message
De
08/02/2001 10:15:03
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00473278
Message ID:
00473963
Vues:
24
>>I have a form which requires a parameter be passed to it. What I tried was
>>
>>LPARAMER lcstkno
>>
>>IF PCOUNT() = 0
>> WAIT WINDOW 'message'
>> Thisform.Release
>>ELSE
>> setup code
>>ENDIF
>>
>>It does not work. Why not? What is correct method of aborting the form?
>
>Return False in the method INIT.
>
>
>* Init
>LPARAMER lcstkno
>IF PCOUNT() = 0
>   WAIT WINDOW 'message' NOWAIT
>   RETURN .F.
>ELSE
>   * setup code
>ENDIF
>
In this case we must do it in .init, but if possible (i.e. does not depend on the parameter) it better be done in .load (return .f. from form.load), because of the firing sequence. Init fires when all the tables are open, all the controls instantiated and bound... which may take some time. Quitting before that saves the time.

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform