|
From: Joe E. <jen...@fl...> - 2004-09-24 05:41:31
|
Not mentioned explicitly (but sort of implied by the separate
'itemconfigure' and 'itemcget' commands), the 3-argument form:
$tree itemconfigure $item
returns a list of 5/2-tuples just like widget 'configure' commands do.
It occurred to me that this is completely unnecessary;
[$tree itemconfigure] should return a simple dictionary
of -option/value pairs, just like [font configure] does.
The 4-argument form can replace [$tree itemcget].
Further, the names can be shortened to just the noun part
"item" and "column":
$tree item $item ?-option ?-value ?-option value...???
$tree column $column ...
are generalized data accessors for item and column attributes.
This is a clear win. I'm going to introduce a
* * * POTENTIAL INCOMPATIBILITY * * *
and replace [$notebook tabconfigure] / [$notebook tabcget]
with [$notebook tab], using the same pattern.
Further simplifications: "-open" can be an item option, (I keep
flip-flopping between "open" and "expand[ed]") removing the
need for [$tree open/expand], [$tree close/collapse] and [$tree
opened/expanded]. This is another win: three fewer commands,
and users can set the open/closed state at item creation time.
Plus, I can dump several screensful of boilerplate code.
This makes me happy :-)
--Joe English
jen...@fl...
|