I am not aware of anything like that in Pivot.

What kind of window is being closed to trigger the yes/no dialog?  Are
you talking about a Pivot Window, or maybe a native OS window
(java.awt.Window/java.awt.Frame)?
http://pivot.apache.org/tutorials/windows.html


Here are a couple of old threads that might be useful in the mean time.

Various window listeners
http://apache-pivot-users.399431.n3.nabble.com/Alert-opened-and-the-rest-of-code-keep-going-td2841188.html

Custom Dialog close logic
http://apache-pivot-users.399431.n3.nabble.com/Dialog-Example-td2397810.html#a2399679


It sounds like you probably need to ensure that the window being
closed (which triggers the confirmation dialog) does not get closed
unless a custom flag has been set.  This would be done in some sort of
previewXXX method which would veto the close until the user has
confirmed their intent.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/WindowStateListener.html#previewWindowClose(org.apache.pivot.wtk.Window)

Then your confirmation might set the flag that *does* permit closing
(assuming that option was selected), and then explicitly request the
shutdown of the primary window, which should now work because the flag
was set.

Chris

On 13 August 2011 07:34, Roger L. Whitcomb <[email protected]> wrote:
> I’m trying to ask a simple “Yes” or “No” question of the user (in response
> to trying to close a window), but I need to know the answer synchronously in
> order to know whether to close the window or not.  So, in Windows and Swing
> there is a synchronous dialog that itself does the message pump and so it
> can return when the user clicks the button.  Now, I don’t see anything like
> that in Pivot, so I’m wondering how one would implement such a thing?
> Thanks.
>
>
>
>
>
>
>
> Roger Whitcomb
>
> Architect, Engineering
>
> Ingres Corporation
>
> [email protected]
>
>
>
> PHONE +1 650.587.5596
>
> FAX +1 650.587.5550
>
>
>
> www.ingres.com
>
>
>
> This transmission is confidential and intended solely for the use of the
> recipient named above. It may contain confidential, proprietary, or legally
> privileged information. If you are not the intended recipient, you are
> hereby notified that any unauthorized review, use, disclosure or
> distribution is strictly prohibited. If you have received this transmission
> in error, please contact the sender by reply e-mail and delete the original
> transmission and all copies from your system.
>
>

Reply via email to