2007-12-26 HE This days I tried tcl/tk 8.5 the first time. Here my experiences with 8.5.0 on Windows XP with eTcl.
:-) nice, good, I like it; :-| neutral; :-( not so good, I don't like it, makes additional work:
: ''[HE]'' Sorry! The ttk::checkbutton docu says: to indicate a tri-state or indeterminate selection. : This means. The programmer can find out if the ttk::checkbox is in tristate. : But there is no simple way to set the ttk::checkbutton in a state, to show the user the tristate.
: Perhaps this behavior can be simulate with ttk::checkbutton. But it's not in the docu. And I don't know how? So from my point of view: ttk::checkbutton are not tristate (or better ttk::checkbutton don't show tristate)
checkbutton .c1 -variable c1 -onvalue a -offvalue b -tristatevalue c checkbutton .c2 -variable c2 -onvalue a -offvalue b pack .c1 .ce -side left set c1 a ;# .c1 checked (on) set c1 b ;# .c1 unchecked (off) set c2 b ;# .c2 unchecked (off) ;# .c2 checked with grey background (tristate) ?
time {foreach {a b c} [list de da lus] {break}} 1000 2.396 microseconds per iteration time {lassign [list de da lus] a b c} 1000 1.632 microseconds per iteration
: I don't think the test is unfair. Both are one command, three variables, one list to generate with the same values, must be interpreted. : But for your reassurance: proc a {} { foreach {a b c} [list de da lus] {break} return } proc b {} { lassign [list de da lus] a b c return } time {a} 1000 1.643 microseconds per iteration time {b} 1000 1.234 microseconds per iteration : a: 1.643 / 2.396 => 68,6% time saved after bytecoded : b: 1.234 / 1.632 => 75,6% time saved after bytecoded : => bytecoding saves ~70% time : => lassing still looks faster
ttk::treeview -show tree pack .t -fill both -expand 1 .t insert {} end -id 1 -text de .t insert 1 end -id 3 -text da .t insert 1 end -id 4 -text lus .t insert 4 end -id 5 -text ika .t insert 4 end -id 6 -text rus .t insert {} end -id 2 -text foo
This are my personal first impression. And it covers only a small part of the new features.
enter categories here |
---|