Changeset c61d3f9 in tol for tolbase/lib/toltk/tolmethods.tcl
- Timestamp:
- Jan 26, 2009, 10:15:38 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- a64730a
- Parents:
- 1286a3a
- File:
-
- 1 edited
-
tolbase/lib/toltk/tolmethods.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/toltk/tolmethods.tcl
r1286a3a rc61d3f9 249 249 250 250 #///////////////////////////////////////////////////////////////////////////// 251 proc Tol_SetChartMethod { title source gcfFile geometry filetosave lstNames type lstPairs } { 251 proc Tol_SetChartMethod { title source gcfFile geometry filetosave lstNames 252 type lstPairs {holdon ""}} { 252 253 # 253 254 # PURPOSE: Hook of Chart method … … 266 267 # lstPairs -> when type is 0 pairs is the list of correspondence beetwen index 267 268 # columns to data columns (x-y pairs) 269 # holdon -> tell if the new graph goes into a new context or an existing one 268 270 # 269 271 #///////////////////////////////////////////////////////////////////////////// … … 281 283 } 282 284 # MDI 283 set tl [::project::CreateForm \ 284 -title $wTitle -type Graphs -iniconfig SetGraph -geometry $geometry] 285 $tl setgeometry $geometry 285 if {$holdon ne "" && (![winfo exists $holdon] || [winfo class $holdon] ne "Mdidoc")} { 286 Tol_HciWriter "<W>[mc {Graphic requested to be drawn on %s but that graphic context does not exist or is not a valid grafic windows} $holdon]</W>" 287 set holdon "" 288 } 289 if {[winfo exists $holdon]} { 290 set tl $holdon 291 } else { 292 puts "no existe '$holdon' por eso ... ::project::CreateForm" 293 294 set tl [::project::CreateForm \ 295 -title $wTitle -type Graphs -iniconfig SetGraph -geometry $geometry] 296 $tl setgeometry $geometry 297 } 286 298 set top [$tl getframe] 287 299 # if source is a list is interpreted as a set name and indexes accesing a element … … 303 315 set Instance [::SetGraphDialog::DrawSet $top.g $cmd $source $type $lstPairs \ 304 316 $lstNames $gcfFile [list $title]] 305 bind $top.g <Destroy> +[list ::tol::tableset destroy $cmd] 306 if { [llength $source] > 1} { 307 bind $top.g <Destroy> +[list ::tol::stack release $source] 308 } 309 pack $top.g -fill both -expand yes 310 update 311 ::bayesGraph::GrapOptApplyAxisTicks $Instance ${Instance}::options gr,0 312 if { [string length $filetosave] } { 313 ::bayesGraph::TakePhoto $Instance $filetosave 314 after idle "destroy $tl" 317 if {$holdon ne ""} { 318 ::tol::tableset destroy $cmd 319 if { [llength $source] > 1} { 320 ::tol::stack release $source 321 } 322 } else { 323 bind $top.g <Destroy> +[list ::tol::tableset destroy $cmd] 324 if { [llength $source] > 1} { 325 bind $top.g <Destroy> +[list ::tol::stack release $source] 326 } 327 pack $top.g -fill both -expand yes 328 update 329 ::bayesGraph::GrapOptApplyAxisTicks $Instance ${Instance}::options gr,0 330 if { [string length $filetosave] } { 331 ::bayesGraph::TakePhoto $Instance $filetosave 332 after idle "destroy $tl" 333 } 315 334 } 316 335 return $tl
Note: See TracChangeset
for help on using the changeset viewer.
