Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dangling Datasessions
Message
From
23/02/2001 16:22:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
23/02/2001 08:45:57
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00478620
Message ID:
00479066
Views:
32
>Hi Erik - thanks for your input!
>
>I do have quite a bit happening in the INIT. The form is for managing imports into my system from external data sources. The INIT runs an extended "create table" command to create a temp "import-to" table, it then creates a field list of the data to import and populates a listbox with the field headers. However if the user selects an invalid file to import, none of that other code runs. That's when I try to return .f. in the init.
>
>I don't know if it matters, but virtually all the above mentioned code, including checking for a valid data file, happens in other methods, which are called from the init. They return .t. or .f. depending on the success. If there is any .f. return, the init returns .f.
>
>Oddly, I've created an lOKtoContinue property of the form. Since I can't get the init to bail out successfully, I set this property in the init, then check it in the ACTIVATE event, and if its false, I release the form. The data session gets released with it. So I've got a work-around, but it's still nagging me because it's sloppy code.

I have a form of the kind, but since it has to pick between a few import files, it has to show up anyway.

In your case, why don't you try to do this checking in the .load, and return .f. from there - the DE shouldn't even show up.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform