f



tk busy command doesn't seem to work as documented

The following script first creates and focuses on a button, and then using the suggested workaround from the docs[1] it creates a dummy widget and focuses it after it makes the button busy:

-----
ttk::button .button1 -text "Button1"
bind .button1 <KeyPress> { puts "Button1: Pressed the '%K' key" }
pack .button1
focus .button1

tk busy hold .button1
label .dummy
focus .dummy
update
-----

However as soon as the toplevel window is activated with the mouse, focus automatically moves to .button1 and it starts receiving keyboard events, even though this button should not receive any keyboard events.

Here's another example with two buttons, with the first button being busy and the second button being the focused button:

-----
ttk::button .button1 -text "Button1"
bind .button1 <KeyPress> { puts "Button1: Pressed the '%K' key" }
pack .button1

ttk::button .button2 -text "Button2"
bind .button2 <KeyPress> { puts "Button2: Pressed the '%K' key" }
pack .button2
focus .button2

tk busy hold .button1
update
-----

button2 is focused by default, however I can still <Tab> to .button1 and it will receive keyboard events.

It seems the only thing 'tk busy' reliably blocks are mouse events.

[1] : http://www.tcl.tk/man/tcl8.6/TkCmd/busy.htm
0
9/25/2013 11:05:40 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

1 Replies
363 Views

Similar Articles

[PageSpeed] 58

On Wednesday, September 25, 2013 1:05:40 PM UTC+2, andrej.m...@gmail.com wrote:
> [1] : http://www.tcl.tk/man/tcl8.6/TkCmd/busy.htm

I forgot to mention I'm testing this on Win7.
0
9/25/2013 11:06:06 AM
Reply:

Similar Artilces:

'=' command doesn't work?
Hi, i have a strange problem. It seems so simple, but : disp(['temp2=',num2str(temp2(end))]); Ergebnis(j) = temp2(end); disp(['Ergebnis=',num2str(Ergebnis(j))]); the result is : temp2=184.37 Ergebnis=1 why is Ergebnis(j) still 1? It should be 184.37. Where is the problem, i am quite confused right now. ...

'=' command doesn't work? #2
Hi, i have a strange problem. It seems so simple, but : disp(['temp2=',num2str(temp2(end))]); Ergebnis(j) = temp2(end); disp(['Ergebnis=',num2str(Ergebnis(j))]); the result is : temp2=184.37 Ergebnis=1 why is Ergebnis(j) still 1? It should be 184.37. Where is the problem, i am quite confused right now. "martin Müllinger" <zettinger@gmx.de> wrote in message <i9m736$gu7$1@fred.mathworks.com>... > Hi, > > i have a strange problem. It seems so simple, but : > > disp(['temp2=',num2str(temp2(end))]); &g...

document.createElement('a') doesn't work?
After noticing some problems with a script, I tried testing various bits in the squarefree javascript shell ( http://www.squarefree.com/shell/shell.html ) and noticed this: var anchor = document.createElement("a"); anchor undefined but: var anchor = document.createElement("p"); anchor [object HTMLParagraphElement] Hmmmm. I tried it on a bunch of other elements, including some that don't exist: var anchor = document.createElement("rant"); anchor [object HTMLUnknownElement] So great. I can create a "rant" tag, but an an...

Global command doesn't seem to work...
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3522337593_12907799 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Inside of Functions.py I define the function: def subwords (): global subwordsDL subwordsDL =3D {'enjoy':['like', 'appreciate', 'love', 'savor'], 'hurt':['damage', 'suffering']} print (subwordsDL) Return In my test code module, the code is: glob...

%d substitution doesn't seem to work as documented
Example script ----- bind . <ButtonPress> { puts "detail = %d" } ----- In the docs[1] for event details it says: ----- The last part of a long event specification is detail. In the case of a ButtonPress or ButtonRelease event, it is the number of a button (1-5). ----- And in the docs[2] for binding scripts and substitutions it says: ----- %d The detail or user_data field from the event. ----- However my script example only prints out "??" when I press the mouse button on the toplevel window. Are the docs wrong or am I doing something wrong? [1] : http://www.tcl.tk/man/tcl8.6/TkCmd/bind.htm#M23 [2] : http://www.tcl.tk/man/tcl8.6/TkCmd/bind.htm#M24 On Saturday, August 31, 2013 10:31:23 PM UTC+2, andrej.m...@gmail.com wrote: > However my script example only prints out "??" when I press the mouse button on the toplevel window. Are the docs wrong or am I doing something wrong? Ah I've just realized there's a %b substitution for this purpose, perfect. On Saturday, August 31, 2013 10:46:31 PM UTC+2, andrej.m...@gmail.com wrote: > On Saturday, August 31, 2013 10:31:23 PM UTC+2, andrej.m...@gmail.com wrote: > > > However my script example only prints out "??" when I press the mouse button on the toplevel window. Are the docs wrong or am I doing something wrong? > > > > Ah I've just realized there's a %b substitution for this purpose, perfec...

Odd -- document.getElementById doesn't seem to work in this context
Maybe I just need another pair of eyes or two, but it really seems as if document.getElementById is choking on me. This page: http://www.mortgageplans.com/mbc-network/enroll.html?EC=245 has an input form field coded like so: <input id="enrollCodeField" type="text" name="Code" value="" size="9"/> And I've got the following javascript, which tries to get a reference to that element and change its value: x = document.getElementById('enrollCodeField'); if(x) x.value = ec; else alert('Can\'t find the input ...

Encounter: command "reportGateCount" doesn't seem to work properly
Hi, I have been using various releases of (SOC) encounter in the last years, namely 5.2, 7.1, and since recently 8.1. It seems to me that in all these releases, the command "reportGateCount" doesn't work properly (= as described in the documentation). However, when searching support.cadence.com or this newsgroup, I couldn't find any reports about others also experiencing this strange behavior. So I want to actively ask people about their experience with this command. The details of the strange behavior I see are: My aim is to report the area of the whole design AND the ...

newbie question: Tk::Tree 'open' setting doesn't work?
I have the following on my Tree object: $ctree->add('Baby Items', -text => 'Baby Items', -at => 0); $ctree->add('Baby Items.Bibs', -text => 'Bibs', -at => 1); $ctree->add('Baby Items.Blankets', -text => 'Blankets', -at => 2); $ctree->add('Doilies', -text => 'Doilies', -at => 3); $ctree->add('Doilies.Small Circular', -text => 'Small Circular', -at => 4); $ctree->autosetmode; $ctree->setmode('Baby Items', 'open'); $ctree->setmode('Doi...

'pipe <' doesn't work in Windows xp? I get an error saying its not a command...
Hello everyone. I thought pipes can be used in windows as well as mainframes? For instance, this program will run fine on a mainframe but when I bring it to windows using r4 interpreter it says c:\r4>r4 dmd qbglk clistd a before workdata 'pipe' is not recognized as an internal or external command, operable program or batch file. 54 +++ command: pipe < qbglk clistd a | locate 1-11 /class name/ | take first 1 | spec 15.255 nw | STRIP trailing | stem class. +++ ERROR rc: 255 processing file qbglk -- class class.1 'pipe' is not recognized as an internal or external co...

TCL 'infotag get med_envelope_from' doesn't work on IOS 12.3(6) ?
Hallo, Does anybody know why I cant use: infotag get med_envelope_from on IOS 12.3(6) ? How can I obtain e-mail from address in mmoip dial-peer application (off-ramp fax). Thank you in advance, Hypnos ...

Perl/Tk: can't get -command=> \&function to work 'on-the-fly'!!
Please Help! I am trying to define buttons 'on-the-fly' mostly because their number is determined in a config file - I don't know how many I will need. It's ROYALLY NOT WORKING. I think Tk.pm is having issues. And it's all driving me very... verrrryyy... batty. *** I WANT THIS TO WORK *** (pseudo-code) for i=1;i<100,i++ { $handle[i] = menubar->command(-label => "test_i", %somecolors, -command => Move2Folder(i)); *** IS THIS TOO MUCH TO ASK??? *** 1) If I 'unroll it' (see end of this message) AND wrap the Move2Folder function...

iproute2 fwmark doesn't work (or iptables --set-mark doesn't)
Hi, I just subscribed this group. Hello everyone! I have a problem with setting up routing. In short, I want to mark certain packets with iptables and then catch these marks with iproute2. However Linux seems to ignore these marks. I have a 3.11.4 kernel with CONFIG_IP_ADVANCED_ROUTER and CONFIG_IP_MULTIPLE_TABLES set. Here's my setup: - eth0: LAN - IP 192.168.0.1, netmask /24 - It connects to the LAN - eth1: WAN - IP 192.168.1.180, netmask /24, gateway 192.168.1.1 - It connects to the Internet - tap0: VPN (created with OpenVPN) - Local IP 172.24.25.4, remote IP (and gateway) 172.24.25.2, netmask /24 I want to pass certain traffic through 192.168.1.1 (eth1) and certain through 172.24.25.2 (tap0) - local traffic as well as routed traffic. Rules will be somewhat complicated (for locally-generated traffic and routed traffic), now just let's assume that I want to mark all packets to go through 192.168.1.1. I have added two new routing tables to /etc/iproute2/rt_tables: #v+ 2 vpn 3 wan #v- I've created two of them, so the main table will not have a default gateway. This way I can avoid errors - if I make a mistake and traffic goes through the main table, it won't get out. Tables are then populated: #v+ ip route flush table main ip route add 192.168.0.0/24 dev eth0 table main ip route add 192.168.1.0/24 dev eth1 table main ip route add 172.24.25.0/24 dev tap0 table main ip route flush table...

JSpec command line run command doesn't work
Hi. I've just installed the JSpec* gem and trying to run some test suites. When I type: jspec run jspec run --browsers ff jspec run --browsers ff --server I receive the next warning and an error report: <gem_dir>/gems/visionmedia-commander-3.2.9/lib/commander/blank.rb:5: warning: undefining `object_id' may cause serious problem error: wrong number of arguments (1 for 0). Use --trace to view backtrace How can I fix the bug and what's the reason? OS: Debian 5.0.2 Ruby: 1.9.1 JSpec: 2.10.0 Firefox: 3.5.2 Thanks. * http://visionmedia.github.com/jspec/...

Seems the ADE's Annotate doesn't work......
I did the DC analyse ( "Save DC Operating Point" option has been chosed), after the simulation has finished. I choosed "Results- >Anotate->DC Operating Point" and it led back to the schematic window. But then no matter what devices or instances I clicked, nothing displayed! Can somebody explain why? Did I do sth wrong? Or are there some someting to setup? :( Change the CDF parameter of ur MOS and set the display params like id vgs etc I will try, thank you. sudheer wrote: > Change the CDF parameter of ur MOS > and set the display params like id vgs etc On J...

Can't get sqlite3.Row working: keyword lookup doesn't work
Hello, using Python 2.7.6 I try to access a sqlite database using keyword lookup instead of position (much more easy to maintain code), but it always fail, with the error: Index must be int or string I have created the database, populated it, and here is the code that tries to retrieve the information: with sqlite3.connect(mydbPath) as db: # open the database db.row_factory = sqlite3.Row cursor = db.cursor() cursor.execute("SELECT * FROM files") for row in cursor.fetchall(): print(row.keys()) print(row["filename&qu...

Jeff Doesn't Like Pizza; Jeff Doesn't Like In-House Working Peripherals
Jeff sits in a tangle of trackball wires. Jeff can't order a delicious pizza from the Web. He won't call the Geek Squad to fix his broken trackball. Meanwhile, Linux service explodes with In-Home Fixit People. Get these People to Fix the Track Ball ! Jeff (!) begin Steve Zissou (JBailo) nymshifted: > > Jeff sits in a tangle of trackball wires. > < snip > Fine, JBailo. So this idiot has felt the need to be mentioned again. You, in your infinite idiocy, naturally did his wishes. Idiot -- Warning: 10 days have passed since your last Windows reinstall. Hi ...

works on Mozilla doesn't work on IE window.opener.document
Hello all, i'm very new at javascript and I was hoping somebody could help me out. I have the following javascript code inside a php form: foreach ($cm_phase_val['PHASES'] as $key => $ph){ echo <<<EOM <script> var defaultSelected = false; var selected = false; var optionName = new Option('$ph', '$ph', defaultSelected, selected) var length = window.opener.document.$form_name.$field_name.length; window.opener.document.$form_name.$field_name.options[$key]= optionName; </script> EOM; } basically it takes a values from column in a table and...

'do over' doesn't work
hi, why my code doesn't work with 'do over'. thanks. ash007. DATA TABLE_BIDON; INPUT X1 X2 X3 X4 X5 $; CARDS; 2 . 5 1161 AB=C9LIEN 35 6 3 1336 ALM=C9RIC 82 1 5 1499 ;RUN; DATA TABLE_BIDON (DROP =3D _I); SET TABLE_BIDON; ARRAY A_VARNUM[*] _NUMERIC_; ARRAY A_VARCAR[*] _CHARACTER_; DO OVER A_VARNUM[*]; IF A_VARNUM[*] =3D . THEN A_VARNUM[*] =3D 0; END; DO OVER A_VARCAR[*]; IF COMPRESS(A_VARCAR[*]) IN (".","") THEN A_VARCAR[*] =3D "Z"; END; RUN; ...

why 'for' doesn't works as it should?
hi, i've got a little code: for ii=4:5 % splines in p-form splineP = GlobalData.SplineFit{ii}; % splines in B-form splineB = fn2fm(splineP, 'B-'); z(ii) = {splineB} z(1) end and what is strange in this is that this 'for' counts from 1:5! z shows me: z = [] [] [] [1x1 struct] [1x1 struct] and z(1) shows {[]} but splineB and splineP shows me only things for ii=4 and ii=5 then i need to put them in one 'thing' so i made: z(ii)= ...

Solaris 8's nawk sub() doesn't seem to work right?
Input file data: dm Jstor1_0 c2t0d0s2 sliced 32511 1948811264 NOHOTUSE nawk program -- no syntax errors but doesn't do what I expected: nawk '{sub(/s2$/, "", $2); print $2 " " $3}' prints: Jstor1_0 c2t0d0s2 What I was hoping to do was to truncate the 's2' in $2 and print as: Jstor1_0 c2t0d0 I need to do this as a regexp match because I will likely also need to exclude s7 and other matched strings later. After some experimentation, it looks as if sub() is operating on $1 only and not iterating over the remaining fields within an inpu...

Why doesn't this command work??
[fred@localhost fred]$ find . -print | xargs grep pattern xargs: unmatched single quote [fred@localhost fred]$ In article <vir81nnapfok02@corp.supernews.com>, Steve wrote: > > [fred@localhost fred]$ find . -print | xargs grep pattern > xargs: unmatched single quote > [fred@localhost fred]$ This is probably due to space and quote in some of your file names. xargs just takes all words found on stdin and use them for the argument list. if you have a file containing quote, one this file name copied on stdin, xargs has no mean to distinguish between a quote part of a file na...

why my work doesn't work? i cant' understnd....
hi guys i've made a software that is a protocol to comunicate between pc and a bord with automotive cpu by datasocket it constains 2 modules called "shm" (sharm) &amp; "cmt" (comunicator). Shm is the user side while cmt is serial port side and this talks with the board I can't understand why if i do run on 2 files (shm_test &amp; cmt_test) the counting of sending and receiving packets sometimes stops and the count accumulate fails... with a wait of 20 ms the problems is solved. where i'm in fall? thank you very much!!! Dario SHM_CMT_TEST.zip: http://fo...

What Happened to "Works for me" ? Ubuntu 12.04 certainly doesn't seem to work for most people.
http://ubuntuforums.org/showthread.php?t=1972725 //Quote Ubuntu 12.04 - The Ultimate Crash - I won't do a distro update EVER AGAIN.. Got a nice pop to update from a nice stable 11.10, Ubuntu/Kubuntu set up.. Asks me to update.. I say sure and click the button.. Wrong answer bananna breath.. Packages install, update stuff, disable stuff and remove "obsolete" packages.. Wants a reboot.. So I give it one.. Now the system locks on boot up with a gray depressing splashscreen and a gray depressing Ubuntu icon.. I have searched the forumns, google, etc.. Seems the...

__getattribute__ doesn't work on 'type' type for '__class__'
I'm running this version of Python: Python 2.4.3 (#1, May 18 2006, 07:40:45) [GCC 3.3.3 (cygwin special)] on cygwin I read in the documentation that these two expressions are interchangeable: x.__getattribute__('name') <==> x.name From "pydoc __getattribute__": ---8<--- Help on method-wrapper object: __getattribute__ = class method-wrapper(object) | Methods defined here: | | __call__(...) | x.__call__(...) <==> x(...) | | __getattribute__(...) | x.__getattribute__('name') <==> x.name --->8--- Yet when I...

Web resources about - tk busy command doesn't seem to work as documented - comp.lang.tcl

Resources last updated: 3/8/2016 4:50:41 AM