Re: How to get path?



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
.



Relevant Pages

  • Re: How to get path?
    ... list help by::gl, and also updates the text displayed in the ... The way I'm operating would be more comfortable, ... # gnocl widgets always know who they are! ...
    (comp.lang.tcl)
  • Re: Older computers and Microsoft Products
    ... hhc...@xxxxxxxxx schrieb: ... Microsoft proceeded to download 9 updates to its XP operating ...
    (rec.pyrotechnics)
  • Re: Older computers and Microsoft Products
    ... hhc314@xxxxxxxxx schrieb: ... Microsoft proceeded to download 9 updates to its XP operating ...
    (rec.pyrotechnics)
  • Re: Offline Windows XP Pro Update?
    ... To get any desired updates, go to Windows Update with any connected machine, ... CD and used on any machine with the selected operating system. ... This version of Windows XP Pro came with the new laptop nearly ...
    (microsoft.public.windowsxp.general)
  • Re: Task bar icons
    ... >A few days ago almost all of the icons in my task bar vanished. ... >operating with Windows XP Home that has all the updates up to and including ...
    (microsoft.public.windowsxp.general)