Re: How to get path?
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Fri, 16 May 2008 15:29:57 -0700 (PDT)
On May 17, 12:16 am, ZB <zbREMOVE_THIS@xxxxxxxxxxxxxxxxxxxx> wrote:
Dnia 16.05.2008 Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx> napisa³/a:
As you can guess, this callback flips the bit at the given pos in the
list help by ::gl, and also updates the text displayed in the
corresponding button.
The list was *just example*. Yes, I'm operating the list variable - but not
by setting/clearing the bits.
What the heck does this have to do with your widget ident issue ?
The way I'm operating would be more comfortable, if I could recognize the
button clicked. And there are some "workarounds" - none of which is neither
natural, nor elegant.
OK. You seem to find inelegant the idea of recording the widget's name
*with* the callback.
Strange taste, I would say.
So you want syntactic sugar ? We can deliver:
proc attach_command_remembering_self {w cmd} {
$w configure -command [string map [list %SELF% $w] $cmd]
}
foreach w {.foo .bar .baz .gnu .gnats} {
attach_command_remembering_self $w {clickme %SELF%}
}
Do you see why it is better to do this in the language, at the data
handling level, than in the GUI package Tk ?
-Alex
.
- Follow-Ups:
- Re: How to get path?
- From: ZB
- Re: How to get path?
- References:
- How to get path?
- From: ZB
- Re: How to get path?
- From: Aric Bills
- Re: How to get path?
- From: ZB
- Re: How to get path?
- From: Alexandre Ferrieux
- Re: How to get path?
- From: ZB
- Re: How to get path?
- From: Alexandre Ferrieux
- Re: How to get path?
- From: ZB
- How to get path?
- Prev by Date: Re: ntext word boundary detection
- Next by Date: Re: How to get path?
- Previous by thread: Re: How to get path?
- Next by thread: Re: How to get path?
- Index(es):
Relevant Pages
|