Version 11 of grab

Updated 2002-06-05 15:20:44

Programmers should be cautious when issuing grabs. This basically takes control from the user, leaving them at the mercy of a program that might not be operating as expected...

Not only that, but if the user needs for instance to copy and pass data from another window, or needs to handle some emergency, and the app has issued a grab, the app is not going to be looked upon kindly.

Best don't do that. Joe English wrote in the comp.lang.tcl newsgroup:

My two rules for [grab -global]:

(1) don't use it unless I'm absolutely sure I know what I'm doing, and

(2) if I think I need it this is a sure sign that I don't know what I'm doing :-)

Bryan Oakley's advice for working with global grabs:

While in development, always put in a failsafe. For example, I'll typically add code such as "after 60000 exit" to quit the application in one minute. That way, if my code has a bug and the grab doesn't get released, my system is only frozen for a minute. Otherwise, depending on circumstances, the system might require a reboot.

Tk syntax help - Arts and crafts of Tcl-Tk programming - Category Command in the Tk package