Close problem

This is a discussion on Close problem within the Clipper forums in Programming Languages category; When the (query)close method(s) of a standard shell are called, the user gets the option to say Don't close, the queryclose returns false and the user can go on. Unfortunately, any open datawindow's (query)close method(s) have been called BEFORE the (query)close method(s) of the shell and everything shut down there remains shut down which will lead to errors. Is it preventable that the (query)close method(s) of datawindows are called before the the owning shell allows closing? Dick van Kooten...

Go Back   Application Development Forum > Programming Languages > Clipper

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-03-2008, 10:15 AM
D.J.W. van Kooten
Guest
 
Default Close problem

When the (query)close method(s) of a standard shell are called, the
user gets the option to say Don't close, the queryclose returns false
and the user can go on.

Unfortunately, any open datawindow's (query)close method(s) have been
called BEFORE the (query)close method(s) of the shell and everything
shut down there remains shut down which will lead to errors.

Is it preventable that the (query)close method(s) of datawindows are
called before the the owning shell allows closing?

Dick van Kooten
Reply With Quote
  #2  
Old 09-03-2008, 11:08 AM
Paul D B
Guest
 
Default Re: Close problem

D.J.W. van Kooten wrote:
> When the (query)close method(s) of a standard shell are called, the
> user gets the option to say Don't close, the queryclose returns false
> and the user can go on.
>
> Unfortunately, any open datawindow's (query)close method(s) have been
> called BEFORE the (query)close method(s) of the shell and everything
> shut down there remains shut down which will lead to errors.
>
> Is it preventable that the (query)close method(s) of datawindows are
> called before the the owning shell allows closing?
>
> Dick van Kooten


Dick,

METHOD Dispatch(oEvent) CLASS HoofdShellWin

// Deze methode zorgt ervoor dat de user een confirm-on-exit box krijgt
als hij het shell

// window sluit. NB: via de Queryclose gaat niet, want dan wordt ook de
queryclose van

// elke childwindow gedaan!



LOCAL oEvt := oEvent AS Event

LOCAL uMsg AS DWORD

uMsg := oEvt:uMsg

DO CASE

CASE (uMsg == WM_QUERYENDSESSION) .OR. (uMsg == WM_CLOSE)

// we prompten de user of hij echt wil sluiten:

IF PDBProceed("Close", "Do you want to close this application?")


ELSE

RETURN 1L // =niet afsluiten

ENDIF

ENDCASE

RETURN SUPERispatch(oEvt)



--
Paul

Reply With Quote
  #3  
Old 09-03-2008, 11:29 AM
D.J.W. van Kooten
Guest
 
Default Re: Close problem

On Wed, 3 Sep 2008 17:08:54 +0200, "Paul D B"
<polleke@NOMORESPAMhnt.be> wrote:

Hello Paul,

>METHOD Dispatch(oEvent) CLASS HoofdShellWin
>
>// Deze methode zorgt ervoor dat de user een confirm-on-exit box krijgt
>als hij het shell



That's quick and that seems indeed to 'reverse' the order of closing
windows. Thanks!

Dick
Reply With Quote
  #4  
Old 09-05-2008, 10:53 PM
Geoff Schaller
Guest
 
Default Re: Close problem

Paul,

What issues a WM_QUERYENDSESSION?

I've been trying this on a SplitWindow by clicking the X and using the
standard Close method but I don't see this event.

Do you know what should be trying to issue this?

Geoff



"Paul D B" <polleke@NOMORESPAMhnt.be> wrote in message
news:48bea887$0$2858$ba620e4c@news.skynet.be:

> D.J.W. van Kooten wrote:
>
> > When the (query)close method(s) of a standard shell are called, the
> > user gets the option to say Don't close, the queryclose returns false
> > and the user can go on.
> >
> > Unfortunately, any open datawindow's (query)close method(s) have been
> > called BEFORE the (query)close method(s) of the shell and everything
> > shut down there remains shut down which will lead to errors.
> >
> > Is it preventable that the (query)close method(s) of datawindows are
> > called before the the owning shell allows closing?
> >
> > Dick van Kooten

>
>
> Dick,
>
> METHOD Dispatch(oEvent) CLASS HoofdShellWin
>
> // Deze methode zorgt ervoor dat de user een confirm-on-exit box krijgt
> als hij het shell
>
> // window sluit. NB: via de Queryclose gaat niet, want dan wordt ook de
> queryclose van
>
> // elke childwindow gedaan!
>
>
>
> LOCAL oEvt := oEvent AS Event
>
> LOCAL uMsg AS DWORD
>
> uMsg := oEvt:uMsg
>
> DO CASE
>
> CASE (uMsg == WM_QUERYENDSESSION) .OR. (uMsg == WM_CLOSE)
>
> // we prompten de user of hij echt wil sluiten:
>
> IF PDBProceed("Close", "Do you want to close this application?")
>
>
> ELSE
>
> RETURN 1L // =niet afsluiten
>
> ENDIF
>
> ENDCASE
>
> RETURN SUPERispatch(oEvt)
>
>
>
> --
> Paul


Reply With Quote
  #5  
Old 09-06-2008, 04:38 PM
Mike Jones
Guest
 
Default Re: Close problem

Geoff,

It's called when you log off or shut down Windows..

Mike

"Geoff Schaller" <geoffx@softxwareobjectives.com.au> wrote in message
news:48c1f0aa@dnews.tpgi.com.au...
> Paul,
>
> What issues a WM_QUERYENDSESSION?
>
> I've been trying this on a SplitWindow by clicking the X and using the
> standard Close method but I don't see this event.
>
> Do you know what should be trying to issue this?
>
> Geoff
>
>
>
> "Paul D B" <polleke@NOMORESPAMhnt.be> wrote in message
> news:48bea887$0$2858$ba620e4c@news.skynet.be:
>
>> D.J.W. van Kooten wrote:
>>
>> > When the (query)close method(s) of a standard shell are called, the
>> > user gets the option to say Don't close, the queryclose returns false
>> > and the user can go on.
>> >
>> > Unfortunately, any open datawindow's (query)close method(s) have been
>> > called BEFORE the (query)close method(s) of the shell and everything
>> > shut down there remains shut down which will lead to errors.
>> >
>> > Is it preventable that the (query)close method(s) of datawindows are
>> > called before the the owning shell allows closing?
>> >
>> > Dick van Kooten

>>
>>
>> Dick,
>>
>> METHOD Dispatch(oEvent) CLASS HoofdShellWin
>>
>> // Deze methode zorgt ervoor dat de user een confirm-on-exit box krijgt
>> als hij het shell
>>
>> // window sluit. NB: via de Queryclose gaat niet, want dan wordt ook de
>> queryclose van
>>
>> // elke childwindow gedaan!
>>
>>
>>
>> LOCAL oEvt := oEvent AS Event
>>
>> LOCAL uMsg AS DWORD
>>
>> uMsg := oEvt:uMsg
>>
>> DO CASE
>>
>> CASE (uMsg == WM_QUERYENDSESSION) .OR. (uMsg == WM_CLOSE)
>>
>> // we prompten de user of hij echt wil sluiten:
>>
>> IF PDBProceed("Close", "Do you want to close this application?")
>>
>>
>> ELSE
>>
>> RETURN 1L // =niet afsluiten
>>
>> ENDIF
>>
>> ENDCASE
>>
>> RETURN SUPERispatch(oEvt)
>>
>>
>>
>> --
>> Paul

>



Reply With Quote
  #6  
Old 09-07-2008, 03:10 AM
Geoff Schaller
Guest
 
Default Re: Close problem

Ah! No wonder we don't see it.

Well, we don't care either then <g>. If things get that far then
everything is about to be collapsed so nothing actually matters any
more.

Geoff


"Mike Jones" <michael.jones.nospam@rogers.com> wrote in message
news:g9upp8$l16$1@aioe.org:

> Geoff,
>
> It's called when you log off or shut down Windows..
>
> Mike
>


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:01 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.