Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

option database pattern with * for appname

33 views
Skip to first unread message

Busirane

unread,
May 16, 2018, 9:08:30 AM5/16/18
to
Hello.

I have a question about the option database... but who doesn't? ;)

Actually, the thing I tend to forget is that patterns begin with appname, not the root window, but DKF's tutorial reminded me of that. But I do have a question about a certain behavior I see when using * for the appname:

(Desktop) 1 % tk appname
foo
(Desktop) 2 % frame .f
.f
(Desktop) 3 % option add foo.f.a first
(Desktop) 4 % option get .f a {}
first
(Desktop) 5 % option add *f.b second
(Desktop) 6 % option get .f b {}
second
(Desktop) 7 % option add *.f.c third
(Desktop) 8 % option get .f c {}
(Desktop) 9 %

Why doesn't the third pattern work? I find the second one unnatural in that it requires the leading dot to be removed from the window name. FYI, I'm not actually adding and getting window attributes, but rather tooltip data.

Keith Nash

unread,
May 20, 2018, 5:09:43 AM5/20/18
to
It would be useful to have a command "option dump" that returns a list of
all resource options. The output would be like that of the shell command
"xrdb -query" but would give all the resources that have been set in the Tcl
interpreter, as a Tcl list.

Without this, it is hard to diagnose why an "option add" command has had no
effect.

Keith.
0 new messages