lördagen den 11 oktober 2008 03.40.09 skrev Paul Mackerras: > Robin Rosenberg writes: > > > +proc mcw {menubar args} { > > + set ai [lsearch $args "-label"] > > + if { $ai > 0 } { > > + set label [lindex $args [expr {$ai + 1}]] > > + foreach {l u} [::tk::UnderlineAmpersand $label] { > > Where did you find out about ::tk::UnderlineAmpersand? Is it part of > the exported interface of Tk that we can rely on in future? I found it here. http://wiki.tcl.tk/1632. It hints that it may not be unoffical. Seems to original from: http://groups.google.com/group/comp.lang.perl.tk/browse_thread/thread/5b6f4c6a4a9f17b4/c9f8ab47800d27ee?lnk=st&q=#c9f8ab47800d27ee so if someone thinks there is a problem we could replace it with UnderlineAmpersand with tcl code to do the same (or rip it as is if the license allows it). > > > +# Wrapper for mc to remove ampersands used for accelerators. > > +proc mca {label} { > > + set tl8 [mc $label] > > + foreach {l u} [::tk::UnderlineAmpersand $tl8] break > > + return $l > > return [string map {"&" ""} [mc $label]] > > instead, perhaps? In theory we should translate && to & also, which UnderLineAmpersand does. -- robin -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html