Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read Events
Message
De
31/12/2001 12:33:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
31/12/2001 12:16:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00599428
Message ID:
00599434
Vues:
14
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform