Tk Library Source Code

Artifact [088a512112]
Login

Artifact 088a51211273b73c2245d72e2b19f41438a847a5:

Attachment "dynhelp.patch" to ticket [567982ffff] added by decosterjos 2002-06-12 19:33:58.
Index: dynhelp.tcl
===================================================================
RCS file: /cvsroot/tcllib/bwidget/dynhelp.tcl,v
retrieving revision 1.8
diff -r1.8 dynhelp.tcl
4c4
< #  $Id: dynhelp.tcl,v 1.8 2002/05/09 21:01:06 andreas_kupries Exp $
---
> #  $Id: dynhelp.tcl,v 1.3 2002/03/08 10:50:13 decoster Exp $
39c39,40
<     variable _current ""
---
>     variable _current_balloon ""
>     variable _current_variable ""
48c49
<     bind BwHelpBalloon <Destroy> {if {[info exists DynamicHelp::_registered(%W)]} {unset DynamicHelp::_registered(%W)}}
---
>     bind BwHelpBalloon <Destroy> {if {[info exists DynamicHelp::_registered(%W,balloon)]} {unset DynamicHelp::_registered(%W,balloon)}}
53c54
<     bind BwHelpVariable <Destroy> {if {[info exists DynamicHelp::_registered(%W)]} {unset DynamicHelp::_registered(%W)}}
---
>     bind BwHelpVariable <Destroy> {if {[info exists DynamicHelp::_registered(%W,variable)]} {unset DynamicHelp::_registered(%W,variable)}}
122,123d122
<         set idx  [lsearch $evt "BwHelp*"]
<         set evt  [lreplace $evt $idx $idx]
125a125,126
> 		set idx  [lsearch $evt "BwHelpBalloon"]
> 		set evt  [lreplace $evt $idx $idx]
128c129
<                     set _registered($path) $text
---
>                     set _registered($path,balloon) $text
131,132c132,133
<                     if {[info exists _registered($path)]} {
<                         unset _registered($path)
---
>                     if {[info exists _registered($path,balloon)]} {
>                         unset _registered($path,balloon)
139a141,142
> 		set idx  [lsearch $evt "BwHelpVariable"]
> 		set evt  [lreplace $evt $idx $idx]
143c146
<                     set _registered($path) [list $var $text]
---
>                     set _registered($path,variable) [list $var $text]
146,147c149,150
<                     if {[info exists _registered($path)]} { 
<                         unset _registered($path)
---
>                     if {[info exists _registered($path,variable)]} { 
>                         unset _registered($path,variable)
195a199,204
>         if {[info exists _registered($path,balloon)]} {
>             unset _registered($path,balloon)
>         }
>         if {[info exists _registered($path,variable)]} {
>             unset _registered($path,variable)
>         }
201a211,216
>         if {[info exists _registered($path,balloon)]} {
>             unset _registered($path,balloon)
>         }
> 	if {[info exists _registered($path,variable)]} {
>             unset _registered($path,variable)
>         }
217c232
<     variable _current
---
>     variable _current_balloon
219,220c234,235
<     if { $_current != $path && $type == "enter" } {
<         set _current $path
---
>     if { $_current_balloon != $path && $type == "enter" } {
>         set _current_balloon $path
224c239
<     if { $_current == $path } {
---
>     if { $_current_balloon == $path } {
235c250
<             set _current ""
---
>             set _current_balloon ""
246c261
<     variable _current
---
>     variable _current_variable
249c264
<     if { $_current != $path && [info exists _registered($path)] } {
---
>     if { $_current_variable != $path && [info exists _registered($path,variable)] } {
251c266
<             set _saved [GlobalVar::getvar [lindex $_registered($path) 0]]
---
>             set _saved [GlobalVar::getvar [lindex $_registered($path,variable) 0]]
253,254c268,269
<         GlobalVar::setvar [lindex $_registered($path) 0] [lindex $_registered($path) 1]
<         set _current $path
---
>         GlobalVar::setvar [lindex $_registered($path,variable) 0] [lindex $_registered($path,variable) 1]
>         set _current_variable $path
264c279
<     variable _current
---
>     variable _current_variable
267,268c282,283
<     if { [info exists _registered($path)] } {
<         GlobalVar::setvar [lindex $_registered($path) 0] $_saved
---
>     if { [info exists _registered($path,variable)] } {
>         GlobalVar::setvar [lindex $_registered($path,variable) 0] $_saved
271c286
<     set _current ""
---
>     set _current_variable ""
306c321
<     if { [info exists _registered($path)] } {
---
>     if { [info exists _registered($path,balloon)] } {
317c332
<         label $_top.label -text $_registered($path) \
---
>         label $_top.label -text $_registered($path,balloon) \