#2546 Event 'Map' is generated also for children

obsolete: 8.4.19
closed-invalid
Jeffrey Hobbs
5
2008-11-14
2008-11-14
Anonymous
No

Under Unix, when using the:
bind .any_toplevel <Map> {some code}

The code is executed when the window is mapped (ok), but also for each child widget being mapped.

- Either this behavior is the same on all systems, in which case the man page would benefit in having a comment about this;

- or this is not the case, then only one mapping event should be generated for the bound widget.

contact info: christophe [dot] curis [at] free [dot] fr

Discussion

  • Jeffrey Hobbs
    Jeffrey Hobbs
    2008-11-14

    This is the correct behavior based on the binding order (bindtags). When you do a <Map> binding, you should do a nominal [if {%W eq $myActualTop} { # do something }] (or you could test that it is a toplevel type widget).

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2008-11-14

    • status: open --> closed-invalid