Bwidget Source Code
Check-in [7665445856]
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:widget.tcl: Widget::which errors when option not present. Ticket [397db23424]
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: 7665445856091342aa88ae4944e7536edff9b5ac
User & Date: oehhar 2014-09-05 12:33:45
References
2014-09-05
12:43 Closed ticket [397db23424]: Themed ComboBox fails on -postcommand plus 8 other changes artifact: b055409d7a user: oehhar
Context
2014-09-08
11:51
Correct test results after clt post of Pietro Cerutti check-in: 138cccca8f user: oehhar tags: bwidget
2014-09-05
12:33
widget.tcl: Widget::which errors when option not present. Ticket [397db23424] check-in: 7665445856 user: oehhar tags: bwidget
2014-07-18
06:47
All message rc files must have \n\n at the end for freewrap. Ticket [683c6245b4] check-in: c4cfe0f45e user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




2014-05-21 Harald Oehlmann <[email protected]>

        widget.tcl: Don't invoke unqualified upvar in callers
        scope. Patch by Adrian Medrano Calvo. Ticket [046fa04231]

        widget.tcl: Don't double creation of temporary widget for
        default values retrieval. Use result of _get_tkwidget_options
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2014-09-05 Harald Oehlmann <[email protected]>

	widget.tcl: Widget::which errors when option not present.
	Ticket [397db23424]

2014-05-21 Harald Oehlmann <[email protected]>

        widget.tcl: Don't invoke unqualified upvar in callers
        scope. Patch by Adrian Medrano Calvo. Ticket [046fa04231]

        widget.tcl: Don't double creation of temporary widget for
        default values retrieval. Use result of _get_tkwidget_options

Changes to widget.tcl.

1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
    variable _class;
    set class $_class($path);

    switch -- $type {
	-option {
	    upvar 0 ${class}::$path:opt pathopt;

	    if { ![info exists pathopt($option)] } {
		error "unable to find variable for option \"$option\"";
	    }

	    return ::Widget::${class}::${path}:opt(${name});
	}
	-variable {
	    return ${class}::${path}:${name};
	}






|
|







1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
    variable _class;
    set class $_class($path);

    switch -- $type {
	-option {
	    upvar 0 ${class}::$path:opt pathopt;

	    if { ![info exists pathopt($name)] } {
		error "unable to find variable for option \"$name\"";
	    }

	    return ::Widget::${class}::${path}:opt(${name});
	}
	-variable {
	    return ${class}::${path}:${name};
	}