[vwnc] Closing a window and opening a Dialog ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Closing a window and opening a Dialog ...

Dennis smith-4
The normal "ApplicationModel" close is asynchronous, and if you do the
following

    |app|
    app := XXcityUI allInstances detect: [:x | x builder window isOpen].
    app closeRequest.
    Dialog warn: 'Testing'

Where there is an open window of XXcityUI, a subclass of
ApplicationModel, then it does
not close because the Dialog opened before the close occurred, and the
close says if there is
a modal window open, do nothing.

I can see a few ways around this -- but I am interested in how others
close their windows and if
anyone has seen this problem before??

--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Closing a window and opening a Dialog ...

thomas.hawker

That raises a question I’ve had for some time.  Why is a synchronous attempt to close a window deferred and made asynchronous?  I can see that the asynchronous path is required because of incoming [external] window events, such as those passed up from the host window manager.  But it seems to me that if, under normal application control, I close the window, it should go away immediately.  That is, it should just do all the things that normally happen without deferring the behavior to the window manager event loop.

 

Cheers!

 

Tom Hawker

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

Senior Framework Developer

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

Home  +1 (408) 274-4128

Office      +1 (408) 576-6591

Mobile      +1 (408) 835-3643

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Dennis Smith
Sent: Tuesday, October 20, 2009 7:49 AM
To: VWNC,
Subject: [vwnc] Closing a window and opening a Dialog ...

 

The normal "ApplicationModel" close is asynchronous, and if you do the

following

 

    |app|

    app := XXcityUI allInstances detect: [:x | x builder window isOpen].

    app closeRequest.

    Dialog warn: 'Testing'

 

Where there is an open window of XXcityUI, a subclass of

ApplicationModel, then it does

not close because the Dialog opened before the close occurred, and the

close says if there is

a modal window open, do nothing.

 

I can see a few ways around this -- but I am interested in how others

close their windows and if

anyone has seen this problem before??

 

--

Dennis Smith                                 +1 416.798.7948

Cherniak Software Development Corporation   Fax: +1 416.798.0948

509-2001 Sheppard Avenue East        [hidden email]

Toronto, ON M2J 4Z8              sip:[hidden email]

Canada                           http://www.CherniakSoftware.com

Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

 

_______________________________________________

vwnc mailing list

vwnc@cs.uiuc.edu

http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not
intended for you, please delete it immediately unread.  The internet
cannot guarantee that this communication is free of viruses, interception
or interference and anyone who communicates with us by email is taken
to accept the risks in doing so.  Without limitation, OOCL and its affiliates
accept no liability whatsoever and howsoever arising in connection with
the use of this email.  Under no circumstances shall this email constitute
a binding agreement to carry or for provision of carriage services by OOCL,
which is subject to the availability of carrier's equipment and vessels and
the terms and conditions of OOCL's standard bill of lading which is also
available at http://www.oocl.com.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Closing a window and opening a Dialog ...

Terry Raymond
In reply to this post by Dennis smith-4


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Dennis Smith
> Sent: Tuesday, October 20, 2009 10:49 AM
> To: VWNC,
> Subject: [vwnc] Closing a window and opening a Dialog ...
>
> The normal "ApplicationModel" close is asynchronous, and if you do the
> following
>
>     |app|
>     app := XXcityUI allInstances detect: [:x | x builder window isOpen].
>     app closeRequest.
>     Dialog warn: 'Testing'
>
> Where there is an open window of XXcityUI, a subclass of
> ApplicationModel, then it does
> not close because the Dialog opened before the close occurred, and the
> close says if there is
> a modal window open, do nothing.

Where is this code?

>
> I can see a few ways around this -- but I am interested in how others
> close their windows and if
> anyone has seen this problem before??
>
> --
> Dennis Smith                         +1 416.798.7948
> Cherniak Software Development Corporation   Fax: +1 416.798.0948
> 509-2001 Sheppard Avenue East        [hidden email]
> Toronto, ON M2J 4Z8              sip:[hidden email]
> Canada         http://www.CherniakSoftware.com
> Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Closing a window and opening a Dialog ...

Terry Raymond
In reply to this post by Dennis smith-4
Denis

I suspect the reason it does not allow a window to be
closed if a dialog is open is because you don't want the
dialog's parent to close. I suppose the test could be made
more specific to not allow a window in the modal chain
to be closed.

If you know the window you are closing is not in the modal
chain can always duplicate most of the code in
ApplicationStandardSystemController>>closeNoTerminate and
bypass the test.

Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Dennis Smith
> Sent: Tuesday, October 20, 2009 10:49 AM
> To: VWNC,
> Subject: [vwnc] Closing a window and opening a Dialog ...
>
> The normal "ApplicationModel" close is asynchronous, and if you do the
> following
>
>     |app|
>     app := XXcityUI allInstances detect: [:x | x builder window isOpen].
>     app closeRequest.
>     Dialog warn: 'Testing'
>
> Where there is an open window of XXcityUI, a subclass of
> ApplicationModel, then it does
> not close because the Dialog opened before the close occurred, and the
> close says if there is
> a modal window open, do nothing.
>
> I can see a few ways around this -- but I am interested in how others
> close their windows and if
> anyone has seen this problem before??
>
> --
> Dennis Smith                         +1 416.798.7948
> Cherniak Software Development Corporation   Fax: +1 416.798.0948
> 509-2001 Sheppard Avenue East        [hidden email]
> Toronto, ON M2J 4Z8              sip:[hidden email]
> Canada         http://www.CherniakSoftware.com
> Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Closing a window and opening a Dialog ...

Dennis smith-4
Yes that was my #1 solution -- I actually have a
    closeImmediate
method that does that -- I was just interested in comments -- thanks

Terry Raymond wrote:
Denis

I suspect the reason it does not allow a window to be
closed if a dialog is open is because you don't want the
dialog's parent to close. I suppose the test could be made
more specific to not allow a window in the modal chain
to be closed.

If you know the window you are closing is not in the modal
chain can always duplicate most of the code in
ApplicationStandardSystemController>>closeNoTerminate and
bypass the test.

Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

  
-----Original Message-----
From: [hidden email] [[hidden email]] On Behalf Of Dennis Smith
Sent: Tuesday, October 20, 2009 10:49 AM
To: VWNC,
Subject: [vwnc] Closing a window and opening a Dialog ...

The normal "ApplicationModel" close is asynchronous, and if you do the
following

    |app|
    app := XXcityUI allInstances detect: [:x | x builder window isOpen].
    app closeRequest.
    Dialog warn: 'Testing'

Where there is an open window of XXcityUI, a subclass of
ApplicationModel, then it does
not close because the Dialog opened before the close occurred, and the
close says if there is
a modal window open, do nothing.

I can see a few ways around this -- but I am interested in how others
close their windows and if
anyone has seen this problem before??

--
Dennis Smith                 		         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@...
Canada			         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
    

  

-- 
Dennis Smith                 		         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@...
Canada			         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Closing a window and opening a Dialog ...

Dennis smith-4
In reply to this post by Terry Raymond
Its in
    ApplicationModel>>closeNoTerminate

Terry Raymond wrote:
  
-----Original Message-----
From: [hidden email] [[hidden email]] On Behalf Of Dennis Smith
Sent: Tuesday, October 20, 2009 10:49 AM
To: VWNC,
Subject: [vwnc] Closing a window and opening a Dialog ...

The normal "ApplicationModel" close is asynchronous, and if you do the
following

    |app|
    app := XXcityUI allInstances detect: [:x | x builder window isOpen].
    app closeRequest.
    Dialog warn: 'Testing'

Where there is an open window of XXcityUI, a subclass of
ApplicationModel, then it does
not close because the Dialog opened before the close occurred, and the
close says if there is
a modal window open, do nothing.
    

Where is this code?

  
I can see a few ways around this -- but I am interested in how others
close their windows and if
anyone has seen this problem before??

--
Dennis Smith                 		         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@...
Canada			         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
    


Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

  

-- 
Dennis Smith                 		         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@...
Canada			         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc