Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form won't stay open
Message
From
17/05/2009 18:48:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01400297
Message ID:
01400326
Views:
66
>>>I just figured what the problem is. I need to have READ EVENTS somewhere right after this form. But then I will need to have another READ EVENTS after the second form. A little confusing to have 2 READ EVENTS. Unless I am missing something else.
>>
>>I think, you need only one READ EVENTS in your code.
>
>I agree. I just can't seem to figure where to stick it. I think I need to get away from this problem; rest and maybe the solution will come to me later.

Read Events happens when your startup code has set everything up and you're starting the event loop, i.e. waiting for the user to do something. Clear events happens when user exits, and then your cleanup code runs. Everything in between is an idle loop, when your app either responds to user actions, or external events (messages from OS - machine shutdown, perhaps, tracking OS events like directory content change), or runs on timers.

Now you only need to figure out how to split your code into these three: startup, events, cleanup. You may choose to have several event loops - when user exits one, given some condition you may decide to restart the same loop (say - logout, or timeout and you require a fresh login), or user decides to run a different branch of the app so you start a different loop (for which you need a different startup code and the Read Events is in a different location in your code).

If you want to run a single form with an implied event loop (without Read Events), it needs to be a modal form.

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