Joe
READ EVENTS starts the EVENT processing CLEAR EVENTS is what stops the EVENT processing
You need to put a CLEAR EVENTS somewhere in your application where it will be executed. Once READ EVENTS is executed it will not go to the next line of code until a CLEAR EVENTS is issued.
Essentially READ EVENTS is a waiting for an EVENT to occur for which an action will take place. It will process the code associated with the event and once completed will wait for the next event to respond to and so on until a CLEAR EVENT is issued at which time it will no longer respond to events. Typically a CLEAR EVENTS would be a part of an application shutdown process or similar.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Wednesday, 2 March 2016 9:49 AM To: profoxtech@leafe.com Subject: Re: Suggestions for closing out simple applications?
My application is so simple that it has no menu. Is there an advantage to having the clear events in a form rather than directly following the read events in the main program?
Also - what am I missing that would allow the command window to become active after my forms close or is moving the clear events what needs to happen?
Thank you - Joe On Mar 1, 2016 5:09 PM, "Fred Taylor" fbtaylor@gmail.com wrote:
You don't need a CLEAR EVENTS after your READ EVENTS. You need to have a CLEAR EVENTS somewhere else in your code (menu option, last form's Destroy method, etc.) That will cause the main program to pick up after the READ EVENTS and go from there.
Fred
On Tue, Mar 1, 2016 at 2:43 PM, Joe Yoder joe@wheypower.com wrote:
I have never used a framework and often just execute my stuff in the VFP environment. When I do an exe for others to use I am never sure what commands to include to shut things down. Sometimes I end up with applications that can't be shut down without killing them in Task Manager and sometimes I end up with code that forces me to re-execute "Modify Project" after a run after build.
My Simple applications has a main.prg that calls a main form which calls two other modal forms. Each form shuts down with a thisform.release. The main.prg file looks like this:
USE Simple DO FORM Main READ events CLEAR events CLEAR PROGRAM RELEASE all
Right now this setup forces me to goto Program|Cancel before I get the command window back after a run.
Some input from a pro would save me a lot of trial and error!
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]