On Jan 27 at 15:13, Mike Avery spoke:

> This value is in seconds, so if you calculate your timeout in seconds...
> 
> set epoch [ clock seconds ]
> 
> ...
> 
> if { [expr [clock seconds] - $epoch] > 300} {
>       puts "\ntimeout Exceeded!\n"
>       exit
> }

Yes, this works! Thansk!


> So long as they don't conflict you should be ok.  Be sure to limit the 
> binding to something very simple, such as:
> 
> bind all <Motion> +{ set epoch [clock seconds] }
> 
> 
> (bind all) applies the binding to all widgets in the application.  It is 
> important to be sure that you don't squash any other bindings though, as 
> you mentioned.  Thus the "+" before the script portion of the directive. 
>  This causes the binding to be appended to any other bindings for any 
> given widget.


I've used the bind only on the toplevel widget. With the "+" before
the script portion my Wish version complains.
But like this it seems to work!

Thanks!

> You'll want to double-check the docs for the particular version of 
> tclsh/wish that you are using to be sure that the directives I've used 
> above are valid under your version.

I haven't checked the docs themselves. Just when I tried with "+"
Wish complained. It's version 8.3.5_1. 

-Hanspeter


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/vtcl-user

Reply via email to