Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form flashes briefly (read event prob?)
Message
From
09/05/1997 16:51:10
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00031377
Message ID:
00031594
Views:
69
>>>>>Sorry about the upper(). I took your advice it did something.
>>>>>The form no longer gets ignored but the program itself does not continue after the form executes but seems to be hung up.
>>>>
>>>>you have to issue clear events, after read events to terminate the program.
>>>
>>>I am supposed to do form getname, then issue read event, then issue clear event,then do menu mymenu? It still seems caught in that infinite loop :(
>>
>>Basically, VFP app should contain just one common READ EVENTS. Following is a sample of first prg module
>>
>>*** set environment here
>>do mainmenu.mpr
>>read events
>>*** clean environment here
>>
>>Your main menu should have 'Quit' option with CLEAR EVENTS command.
>>Also remember that modal form will 'stop' app until you close it.
>
>My test prg is this simple but gets hung on the read event( as the trace windows told me) as follows:
>clea
>do form getname
>?'hi'
>read event
>@10,10 say 'here now'
>clea event
> in the form the 'ok' button has a command in the code section that says
>"release thisform"

As I told, you must issue clear event from some place before . This is not structural programming. READ EVENTS just tells VFP where is the end of 'event loop'. So put CLEAR EVENT into e.g. form.destroy event and it will work. The normal way is to put it into 'Quit' option of main menu.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform