Bwidget Source Code
Check-in [1656afaa2b]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:tree.tcl (Tree::itemconfigure): Fix intermingling of node names and flag values which can cause an lsearch to fail, by mistaking a flag value as the node searched for, and then treating a node name as flags. As the upd,nodes value is a dictionary it should not be search as a list. Now using a temporary array for quicker check and append/replace [Bug 3106208](report and fix by Andreas Kupries).
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1656afaa2b5ba605f8497d424af239bbb0b4f9a3
User & Date: oehhar 2010-11-10 07:57:58
Context
2010-11-21
17:29
Dialog.html Removed documentation of unavailable option -buttonwidth. check-in: 7eee767759 user: oehhar tags: trunk
2010-11-10
07:57
tree.tcl (Tree::itemconfigure): Fix intermingling of node names and flag values which can cause an lsearch to fail, by mistaking a flag value as the node searched for, and then treating a node name as flags. As the upd,nodes value is a dictionary it should not be search as a list. Now using a temporary array for quicker check and append/replace [Bug 3106208](report and fix by Andreas Kupries). check-in: 1656afaa2b user: oehhar tags: trunk
2010-11-09
16:04
* mainframe.tcl Menu text shows white on white on Mac aqua [Bug 3105665] reported by Scott Smedley fixed by Kevin Walzer. check-in: d4c86b7b85 user: oehhar tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

1
2
3
4
5









6
7
8
9
10
11
12
# ------------------------------------------------------------------------------
#  ChangeLog
#  This file is part of Unifix BWidget Toolkit
#  $Id: ChangeLog,v 1.219 2010/11/09 16:04:45 oehhar Exp $
# ------------------------------------------------------------------------------










2010-11-09 Harald Oehlmann <[email protected]>

	* mainframe.tcl Menu text shows white on white on Mac aqua
	[Bug 3105665] reported by Scott Smedley fixed by Kevin Walzer.

2010-05-31 Harald Oehlmann <[email protected]>


|

>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# ------------------------------------------------------------------------------
#  ChangeLog
#  This file is part of Unifix BWidget Toolkit
#  $Id: ChangeLog,v 1.220 2010/11/10 07:57:58 oehhar Exp $
# ------------------------------------------------------------------------------

2010-11-09  Andreas Kupries  <[email protected]>

	* tree.tcl (Tree::itemconfigure): Fix intermingling of node names
	and flag values which can cause an lsearch to fail, by mistaking a
	flag value as the node searched for, and then treating a node name
	as flags. As the upd,nodes value is a dictionary it should not be
	search as a list. Now using a temporary array for quicker check
	and append/replace [Bug 3106208].

2010-11-09 Harald Oehlmann <[email protected]>

	* mainframe.tcl Menu text shows white on white on Mac aqua
	[Bug 3105665] reported by Scott Smedley fixed by Kevin Walzer.

2010-05-31 Harald Oehlmann <[email protected]>

Changes to tree.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
405
406
407
408
409
410
411
412
413
414
415
416
417

418
419
420
421
422
423
424
# ----------------------------------------------------------------------------
#  tree.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: tree.tcl,v 1.62 2009/09/08 20:46:40 oberdorfer Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - Tree::create
#     - Tree::configure
#     - Tree::cget
#     - Tree::insert
#     - Tree::itemconfigure
................................................................................
        }

	if {$data(upd,level) < 3 && [Widget::hasChanged $path.$node -padx x]} {
	    _redraw_idle $path 3
	}

	if { $data(upd,level) < 3 && $flag } {
            if { [set idx [lsearch -exact $data(upd,nodes) $node]] == -1 } {
                lappend data(upd,nodes) $node $flag
            } else {
                incr idx
                set flag [expr {[lindex $data(upd,nodes) $idx] | $flag}]
                set data(upd,nodes) [lreplace $data(upd,nodes) $idx $idx $flag]

            }
            _redraw_idle $path 2
        }
    }
    return $result
}



|







 







|
|
|
|
|
|
>







1
2
3
4
5
6
7
8
9
10
11
...
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# ----------------------------------------------------------------------------
#  tree.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: tree.tcl,v 1.63 2010/11/10 07:57:58 oehhar Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - Tree::create
#     - Tree::configure
#     - Tree::cget
#     - Tree::insert
#     - Tree::itemconfigure
................................................................................
        }

	if {$data(upd,level) < 3 && [Widget::hasChanged $path.$node -padx x]} {
	    _redraw_idle $path 3
	}

	if { $data(upd,level) < 3 && $flag } {
            # data(upd,nodes) is a key-val list: emulate a dict by an array
            array set n $data(upd,nodes)
            if {![info exists n($node)]} {
                lappend data(upd,nodes) $node $flag
            } else {
                set n($node) [expr {$n($node) | $flag}]
                set data(upd,nodes) [array get n]
            }
            _redraw_idle $path 2
        }
    }
    return $result
}