Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

grab failed: window unviewable...

162 views
Skip to first unread message

Paul Elfers

unread,
Feb 5, 1997, 3:00:00 AM2/5/97
to

I have a big piece of recursive Tk code that basically creates a new
window over the old one and takes the focus with the grab command.
Among the options in this window are the opportunity to spawn a new
window on top, or to drop back to the old window (closing the top
windows and reshifting the focus.) My code works perfectly 90% of the
time, but every so often I get this error when trying to open a new
window " grab failed: window unviewable"

I have no way of reproducing the result, it comes (it seems) from
nowhere... If I wait for a second before trying again, then it work
sometimes, or if I quit the application and restart it, it works fine as
well.

I am using tk4.0 and tcl 7.4 on sunos 4.1.3

Anyone have any ideas? As you might imageine, the randomness of this
error scares me. Thanks!

-Paul Elfers, Symbios Logic

Jeffrey Hobbs

unread,
Feb 5, 1997, 3:00:00 AM2/5/97
to

In article <32F8CA18...@symbios.com>,

Paul Elfers <paul....@symbios.com> wrote:
>time, but every so often I get this error when trying to open a new
>window " grab failed: window unviewable"

grab will fail if the toplevel is not deiconified on the screen already.
So, make sure that the window you are about to grab is on the screen.
This might require explicit "wm deiconify .toplevel" or "update idle"
commands.

--
Jeffrey Hobbs office: 541.683.7891
Nomad of the 'Net email: jho...@cs.uoregon.edu
URL: http://www.cs.uoregon.edu/~jhobbs/

0 new messages