Index
2000-08-18 02:58 – Iames Pizzoli : VFP6 SP3: Where do READ/CLEAR EVENTS go?
2000-08-18 03:08 – John C. Gunvaldson, CNE, MCP : RE: VFP6 SP3: Where do READ/CLEAR EVENTS go?
2000-08-18 03:11 – Allen Pollard : RE: VFP6 SP3: Where do READ/CLEAR EVENTS go?
2000-08-18 11:59 – Iames Pizzoli : R: VFP6 SP3: Where do READ/CLEAR EVENTS go?
2000-08-18 12:32 – jgunva - John C. Gunvaldson (DQ) : RE: VFP6 SP3: Where do READ/CLEAR EVENTS go?
2000-08-18 19:23 – Wilmar Guday : Re: VFP6 SP3: Where do READ/CLEAR EVENTS go?
2013-01-30 18:47 – Gene Wirchenko : clear events Issue
2013-01-30 19:04 – Frank Cazabon : Re: clear events Issue
2013-01-31 02:05 – Jean MAURICE : Re: clear events Issue
2013-01-31 11:14 – Gene Wirchenko : Re: clear events Issue
Back to top
VFP6 SP3: Where do READ/CLEAR EVENTS go?

Author: Iames Pizzoli

Posted: 2000-08-18 02:58:19   Link

Hi,

I'm building a project with one and only form, a top level form. It'll have

a pageframe, a bunch of controls and two commandbuttons, OK and Cancel. No

menu. That's all. When I try it in the IDE, all is OK. But launched as an

EXE it starts and immediately disappears. I know this is due to the lack of

READ EVENTS. But where is its (and CLEAR EVENTS') place?

TIA

Iames

©2000 Iames Pizzoli
Back to top
RE: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Author: John C. Gunvaldson, CNE, MCP

Posted: 2000-08-18 03:08:42   Link

Real quick,

One way is to create a small program to run the form. Something along the

lines of the following....

close all

clear all

clear

set procedure to &my procedure

set talk off

set deleted on

ect...

ect...

DO MyMainForm.Scx

Read Events

*--------

Then on a Button (called <Close Form ) on the Form - Have the click event

execute something like...

CLEAR EVENTS

ThisForm.Visible = .F.

ThisForm.Release()

RETURN DODEFAULT()

In a very simple Top Level Form - a process like this will work - I believe

the "Read Events" must exist outside of the Form - and before it is

called....

hth

John C. Gunvaldson, CNE, MCP

San Diego, CA

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Iames

Pizzoli

Sent: Friday, August 18, 2000 12:58 AM

To: Multiple recipients of ProFox

Subject: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Hi,

I'm building a project with one and only form, a top level form. It'll have

a pageframe, a bunch of controls and two commandbuttons, OK and Cancel. No

menu. That's all. When I try it in the IDE, all is OK. But launched as an

EXE it starts and immediately disappears. I know this is due to the lack of

READ EVENTS. But where is its (and CLEAR EVENTS') place?

TIA

Iames

----------------------------------------

Subscription maintenance at:

http://leafe.com/mailListMaint.html

©2000 John C. Gunvaldson, CNE, MCP
Back to top
RE: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Author: Allen Pollard

Posted: 2000-08-18 03:11:36   Link

I put the read in the calling first program and the clear could in your case

go in both buttons or the unload of the form.

Allen

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Iames

Pizzoli

Sent: 18 August 2000 08:58

To: Multiple recipients of ProFox

Subject: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Hi,

I'm building a project with one and only form, a top level form. It'll have

a pageframe, a bunch of controls and two commandbuttons, OK and Cancel. No

menu. That's all. When I try it in the IDE, all is OK. But launched as an

EXE it starts and immediately disappears. I know this is due to the lack of

READ EVENTS. But where is its (and CLEAR EVENTS') place?

TIA

Iames

----------------------------------------

Subscription maintenance at:

http://leafe.com/mailListMaint.html

©2000 Allen Pollard
Back to top
R: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Author: Iames Pizzoli

Posted: 2000-08-18 11:59:00   Link

John,

...

> CLEAR EVENTS

> ThisForm.Visible = .F.

> ThisForm.Release()

> RETURN DODEFAULT()

thanks, it worked!!

> In a very simple Top Level Form - a process like this will work -

> I believe

> the "Read Events" must exist outside of the Form - and before it is

> called....

So I repeatedly banged my head against the wall trying to do it all inside

the form.... Oh, well... Thanks again.

Iames

©2000 Iames Pizzoli
Back to top
RE: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Author: jgunva - John C. Gunvaldson (DQ)

Posted: 2000-08-18 12:32:34   Link

No problem,

Glad it worked - and I left out all the steps where your startup program

does all of the environment saving calls (ie: lcOldDeleted = SET('DELETED'),

lcOldSafety = SET('SAFETY') etc... )- keeps track of paths, settings and

menus

does the form

and does all the cleanup, by returning the status of VFP environment, menus,

paths and settings - (ie: SET DELETED &lcOldDeleted,,,,) "We want to play

nice, yes <g>?"

Cheers

John C. Gunvaldson

San Diego, CA

-----Original Message-----

Subject: R: VFP6 SP3: Where do READ/CLEAR EVENTS go?

John,

...

> CLEAR EVENTS

> ThisForm.Visible = .F.

> ThisForm.Release()

> RETURN DODEFAULT()

thanks, it worked!!

> In a very simple Top Level Form - a process like this will work -

> I believe

> the "Read Events" must exist outside of the Form - and before it is

> called....

So I repeatedly banged my head against the wall trying to do it all

inside

the form.... Oh, well... Thanks again.

Iames

----------------------------------------

Subscription maintenance at:

http://leafe.com/mailListMaint.html

©2000 jgunva - John C. Gunvaldson (DQ)
Back to top
Re: VFP6 SP3: Where do READ/CLEAR EVENTS go?

Author: Wilmar Guday

Posted: 2000-08-18 19:23:06   Link

Put the READ EVENTS in the Activate procedure of the

form and the CLEAR EVENTS after you RELEASE the form.

This works for me.

Wilmar

----- Original Message -----

From: "Iames Pizzoli" <esperiasw@net24.it>

To: "Multiple recipients of ProFox" <profox@leafe.com>

Sent: Friday, August 18, 2000 3:58 PM

Subject: VFP6 SP3: Where do READ/CLEAR EVENTS go?

> Hi,

>

> I'm building a project with one and only form, a top level form. It'll

have

> a pageframe, a bunch of controls and two commandbuttons, OK and Cancel. No

> menu. That's all. When I try it in the IDE, all is OK. But launched as an

> EXE it starts and immediately disappears. I know this is due to the lack

of

> READ EVENTS. But where is its (and CLEAR EVENTS') place?

>

> TIA

>

> Iames

>

>

>

> ----------------------------------------

> Subscription maintenance at:

> http://leafe.com/mailListMaint.html

>

>

©2000 Wilmar Guday
Back to top
clear events Issue

Author: Gene Wirchenko

Posted: 2013-01-30 18:47:54   Link

Dear ProFox'ers:

I have LostFocus validation working reasonably well now with a

test form though I am sure that more complications will ensue.

I have just found a weird behaviour of clear events. I thought

I understood clear events.

In my LostFocus, I start by checking if the mouse pointer is on

the Exit button (with sys(1270)) and that the left mouse button is

down (with mdown()). If this is so, I do not want the validation

done, but rather, I want to terminate the form. I use clear events for this.

My understanding was that execution goes to the statement

immediately after the read events. The VFP 9 docs support this,

stating, "Stops event processing started with READ EVENTS. When CLEAR

EVENTS is executed, program execution continues on the program line

immediately following READ EVENTS."

This is not what happens. The method executing continues to

execute, and when it finishes, then the clear events takes effect (as

best as I can see).

Am I missing something here?

Sincerely,

Gene Wirchenko

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/20130131004803.DGLC2487.priv-edmwes24.telusplanet.net@edmwcm02

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2013 Gene Wirchenko
Back to top
Re: clear events Issue

Author: Frank Cazabon

Posted: 2013-01-30 19:04:06   Link

Gene,

you should really only have one READ EVENTS (in your main program and

nowhere else) and one CLEAR EVENTS in your application. You shouldn't

have to use CLEAR EVENTS to close a form.

It sounds like you want your exit button to act like a cancel button.

Set the buttons Cancel property to .T. and then in your validation check

for LASTKEY() <> 27. Again, this is off the top of my head as I haven't

had to deal with the nitty gritty like this in a long time. Note that

pressing the Escape key will now call your exit button's click method.

Frank.

Frank Cazabon

On 30/01/2013 08:47 PM, Gene Wirchenko wrote:

> Dear ProFox'ers:

>

> I have LostFocus validation working reasonably well now with a

> test form though I am sure that more complications will ensue.

>

> I have just found a weird behaviour of clear events. I thought I

> understood clear events.

>

> In my LostFocus, I start by checking if the mouse pointer is on

> the Exit button (with sys(1270)) and that the left mouse button is

> down (with mdown()). If this is so, I do not want the validation

> done, but rather, I want to terminate the form. I use clear events

> for this.

>

> My understanding was that execution goes to the statement

> immediately after the read events. The VFP 9 docs support this,

> stating, "Stops event processing started with READ EVENTS. When CLEAR

> EVENTS is executed, program execution continues on the program line

> immediately following READ EVENTS."

>

> This is not what happens. The method executing continues to

> execute, and when it finishes, then the clear events takes effect (as

> best as I can see).

>

> Am I missing something here?

>

> Sincerely,

>

> Gene Wirchenko

>

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/5109C306.5050803@gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2013 Frank Cazabon
Back to top
Re: clear events Issue

Author: Jean MAURICE

Posted: 2013-01-31 02:05:45   Link

Hi Gene,

it's the way it works : you can not 'interrupt' the execution of a method or

event. When you execute CLEAR EVENTS, the 'event' is just added at the top of

the event stack ... and unstacked at the end of the current method ....

You have a 'if' to test if the app must end, put the rest of the method in the

'else' ... Hope I am clear.

Now instaed of SYS(1270), can try just to write : thisform.object_name (ie

Thisfom.btnquit). I think it will work. If yes, it shows that the gotfocus() of

the next object is fired before the lostfocus of the current object ...

HTH

The Foxil

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/510A25D9.1090301@wanadoo.fr

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2013 Jean MAURICE
Back to top
Re: clear events Issue

Author: Gene Wirchenko

Posted: 2013-01-31 11:14:29   Link

At 17:04 2013-01-30, Frank Cazabon <frank.cazabon@gmail.com> wrote:

>you should really only have one READ EVENTS (in your main program

>and nowhere else) and one CLEAR EVENTS in your application. You

>shouldn't have to use CLEAR EVENTS to close a form.

I do not have anything else but the form needing event

handling. If I do not clear events in the form, then the program

just sits there waiting for events. (In my app, I have a menu and

the clear events is in there on the Exit selection.)

>It sounds like you want your exit button to act like a cancel button.

Well, no. I want some buttons to not trigger validation. Exit

is but one of them. Cancel (if the documentation is correct) only

allows for one such button.

I also want a Reset button which will exit the adding/editing

of a row but still have the form active. (Most of my forms do not

call up rows on entry. One has to specify form actions (Add, Edit,

Delete, OK, Reset, Exit) with each of these buttons enabled/disabled

depending on state. (For example, when Adding, Add, Edit, and Delete

are disabled and OK, Reset, and Exit are enabled.)

>Set the buttons Cancel property to .T. and then in your validation

>check for LASTKEY() <> 27. Again, this is off the top of my head as

>I haven't had to deal with the nitty gritty like this in a long

>time. Note that pressing the Escape key will now call your exit

>button's click method.

[snip]

Sincerely,

Gene Wirchenko

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/20130131171437.CWGC5280.priv-edmwes50.telusplanet.net@edmwcm02

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2013 Gene Wirchenko