Changeset 1929 for trunk/gui/scripts/drawingentry.tcl
- Timestamp:
- Oct 22, 2010, 4:06:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/drawingentry.tcl
r1342 r1929 38 38 itcl::body Rappture::DrawingEntry::constructor {owner path args} { 39 39 if {[catch {$owner isa Rappture::ControlOwner} valid] != 0 || !$valid} { 40 40 error "bad object \"$owner\": should be Rappture::ControlOwner" 41 41 } 42 42 set _path $path … … 46 46 # 47 47 itk_component add drawing { 48 48 Rappture::Drawing $itk_interior.drawing $owner $path 49 49 } 50 50 pack $itk_component(drawing) -expand yes -fill both … … 67 67 set i [lsearch -exact $args -check] 68 68 if {$i >= 0} { 69 70 69 set onlycheck 1 70 set args [lreplace $args $i $i] 71 71 } 72 72 73 73 if {[llength $args] == 1} { 74 75 76 77 78 79 80 74 if {$onlycheck} { 75 # someday we may add validation... 76 return 77 } 78 set xmlobj [lindex $args 0] 79 $itk_component(drawing) value $xmlobj 80 return $xmlobj 81 81 82 82 } elseif {[llength $args] != 0} { 83 83 error "wrong # args: should be \"value ?-check? ?newval?\"" 84 84 } 85 85 … … 100 100 set label [$_owner xml get $_path.about.label] 101 101 if {"" == $label} { 102 102 set label "Drawing" 103 103 } 104 104 return $label … … 125 125 set valid {normal disabled} 126 126 if {[lsearch -exact $valid $itk_option(-state)] < 0} { 127 127 error "bad value \"$itk_option(-state)\": should be [join $valid {, }]" 128 128 } 129 129 }
Note: See TracChangeset
for help on using the changeset viewer.