Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Events
Message
From
31/12/2001 12:33:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
31/12/2001 12:16:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00599428
Message ID:
00599434
Views:
13
>While testing two forms I kept getting cant find otherform.scx
>So i put in a main.prg then it flashed and went away.
>
>So then I put in read events after my do form firstform.scx
>and clear events after that.
>
>It no longer flashes it just hangs there.
>
>When I do a
>display memory to file "c:\memvar" noconsole
>I can see three of my variables that are public and the one var that is the
>form named getdir.
>If I want to kill these variables explicitly when i close the form and release back to main, do I
>Clear all or release all?
>or something else.
>
>I dont use OOP

I am not sure whether you understand READ EVENTS correctly, so a brief explanation is in order:

READ EVENTS and CLEAR EVENTS are often used in conjunction with a system menu. I believe you could use them without a system menu, too. The idea of using READ EVENTS is to wait for user input. READ EVENTS is a sort of loop, in that VFP 1) waits for user input (say, Form.Command1.Click()), 2) processes the user input (this includes executing methods you have in said .Click(), 3) goes back to the READ EVENTS, awaiting further input.

CLEAR EVENTS is to "break out" of the loop (or wait state).

In your case, you should have a program that: 1) opens both forms, 2) only then issues READ EVENTS. Also, you need some way to "break out", like a Form.Button.Click(), that includes the CLEAR EVENTS.


CLEAR ALL is appropriate at program startup or cleanup. In any other place, it would clear too much to be of any use.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform