Bwidget Source Code
Check-in [5018ffa91f]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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 | bwidget
Files: files | file ages | folders
SHA1: 5018ffa91f188f3d98c6bcabb88b4425fe92d390
User & Date: oehhar 2010-11-10 07:56:53
Context
2010-11-21
17:25
Theming support for Button widget check-in: 02459eb6f9 user: oehhar tags: bwidget
2010-11-10
07:56
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: 5018ffa91f user: oehhar tags: bwidget
2010-11-09
16:05
* mainframe.tcl Menu text shows white on white on Mac aqua [Bug 3105665] reported by Scott Smedley fixed by Kevin Walzer. check-in: ee0e989ff6 user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.










1
2
3
4
5
6
7
8








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-10-15 Harald Oehlmann <[email protected]>

	* label.tcl The frame surround the label gets under
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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-10-15 Harald Oehlmann <[email protected]>

	* label.tcl The frame surround the label gets under

Changes to tree.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
396
397
398
399
400
401
402
403
404
405
406
407
408

409
410
411
412
413
414
415
# ----------------------------------------------------------------------------
#  tree.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: tree.tcl,v 1.60.2.1 2009/08/10 11:28:50 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 } {
            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
...
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# ----------------------------------------------------------------------------
#  tree.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: tree.tcl,v 1.60.2.2 2010/11/10 07:56:53 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
}