Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing form in INIT method
Message
From
08/02/2001 10:15:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00473278
Message ID:
00473963
Views:
23
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform