00001 # Copyright (C) 1997-2004 The CDG Team <cdg@nats.informatik.uni-hamburg.de> 00002 # 00003 # This file is free software; as a special exception the author gives 00004 # unlimited permission to copy and/or distribute it, with or without 00005 # modifications, as long as this notice is preserved. 00006 # 00007 # This program is distributed in the hope that it will be useful, but 00008 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 00009 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00010 00011 ## ---------------------------------------------------------------------------- 00012 ## YadaMethods - configure document for all methods. 00013 ## \ingroup YadaConfiguration 00014 ## 00015 ## \author Michael Daum 00016 ## $Id: YadaMethods.tcl,v 1.15 2003/02/07 16:55:12 micha Exp $ 00017 ## ---------------------------------------------------------------------------- 00018 class YadaMethods { 00019 inherit YadaConfigDocument 00020 00021 00022 # variables ---------------------------------------------------------------- 00023 private variable _methodTypes "" 00024 private variable _isActive 1 00025 private variable _isComplete 0 00026 00027 # methods ------------------------------------------------------------------ 00028 public method init {} 00029 public method getActiveMethods {args}; ## \type TclList 00030 public method activationHandle {} 00031 00032 constructor {args} {}; ## \type TclList 00033 00034 private method _select {{methodName ""}}; ## \type TclString 00035 private method _commit {} 00036 private method _mark {aspect}; ## \type TclString 00037 private method _new {} 00038 private method _dataDirChooser {} 00039 private method _delete {} 00040 private method _defaults {{fileName ""}}; ## \type TclString 00041 private method _initGrammarNames {} 00042 private method _checkMethod {} 00043 00044 }; 00045 00046 ## ---------------------------------------------------------------------------- 00047 ## constructor 00048 ## ---------------------------------------------------------------------------- 00049 body YadaMethods::constructor {args} { 00050 00051 set _allAspects {name type command dataDir grammarName machineName \ 00052 script status} 00053 00054 # edit menu 00055 set index [$itk_component(editMenu) index "Delete"] 00056 incr index 00057 $itk_component(editMenu) insert [incr index] command \ 00058 -label "Check Method" \ 00059 -underline 0 \ 00060 -command [code $this _checkMethod] 00061 00062 # type 00063 itk_component add typeLabel { 00064 label $itk_component(childsite).typeLabel \ 00065 -text "Type:" \ 00066 -anchor nw 00067 } {} 00068 00069 itk_component add typeMark { 00070 frame $itk_component(childsite).typeMark \ 00071 -borderwidth 2 00072 } {} 00073 00074 itk_component add type { 00075 iwidgets::combobox $itk_component(typeMark).box \ 00076 -completion false \ 00077 -unique true \ 00078 -borderwidth 2 \ 00079 -editable 0 \ 00080 } {} 00081 set entry [$itk_component(type) component entry] 00082 $entry configure \ 00083 -validate all \ 00084 -validatecommand [code $this _validateCommand "type" %P] 00085 00086 # grammar 00087 itk_component add grammarLabel { 00088 label $itk_component(childsite).grammarLabel \ 00089 -text "Grammar:" \ 00090 -anchor nw 00091 } {} 00092 00093 itk_component add grammarNameMark { 00094 frame $itk_component(childsite).grammarNameMark \ 00095 -borderwidth 2 00096 } {} 00097 00098 itk_component add grammarName { 00099 iwidgets::combobox $itk_component(grammarNameMark).box \ 00100 -completion false \ 00101 -unique true \ 00102 -borderwidth 2 \ 00103 -editable 0 \ 00104 } {} 00105 set entry [$itk_component(grammarName) component entry] 00106 $entry configure \ 00107 -validate all \ 00108 -validatecommand [code $this _validateCommand "grammarName" %P] 00109 00110 # machine 00111 itk_component add machineLabel { 00112 label $itk_component(childsite).machineLabel \ 00113 -text "Machine:" \ 00114 -anchor nw 00115 } {} 00116 00117 itk_component add machineNameMark { 00118 frame $itk_component(childsite).machineNameMark \ 00119 -borderwidth 2 00120 } {} 00121 00122 itk_component add machineName { 00123 iwidgets::combobox $itk_component(machineNameMark).box \ 00124 -completion false \ 00125 -unique true \ 00126 -borderwidth 2 \ 00127 -editable 0 \ 00128 } {} 00129 set entry [$itk_component(machineName) component entry] 00130 $entry configure \ 00131 -validate all \ 00132 -validatecommand [code $this _validateCommand "machineName" %P] 00133 00134 # method script 00135 itk_component add scriptLabel { 00136 label $itk_component(childsite).scriptLabel \ 00137 -text "Script:" \ 00138 -anchor nw 00139 } {} 00140 00141 itk_component add scriptMark { 00142 frame $itk_component(childsite).scriptMark \ 00143 -borderwidth 2 00144 } {} 00145 00146 itk_component add script { 00147 iwidgets::scrolledtext $itk_component(scriptMark).text \ 00148 -hscrollmode none \ 00149 -vscrollmode static \ 00150 -wrap none \ 00151 -borderwidth 2 \ 00152 -sbwidth 12 \ 00153 -troughcolor gray \ 00154 -textbackground gray80 \ 00155 -height 100 \ 00156 -highlightthickness 2 \ 00157 -highlightcolor gray90 \ 00158 -textfont fixed 00159 } {} 00160 00161 00162 # command 00163 itk_component add commandLabel { 00164 label $itk_component(childsite).commandLabel \ 00165 -text "Command:" \ 00166 -anchor nw 00167 } {} 00168 00169 itk_component add commandMark { 00170 frame $itk_component(childsite).commandMark \ 00171 -borderwidth 2 00172 } {} 00173 00174 itk_component add command { 00175 iwidgets::combobox $itk_component(commandMark).box \ 00176 -completion false \ 00177 -unique true \ 00178 -borderwidth 2 \ 00179 } {} 00180 set entry [$itk_component(command) component entry] 00181 $entry configure \ 00182 -validate all \ 00183 -validatecommand [code $this _validateCommand "command" %P] 00184 00185 # data dir 00186 itk_component add dataDirLabel { 00187 label $itk_component(childsite).dataDirLabel\ 00188 -text "Data Dir:" \ 00189 -anchor nw 00190 } {} 00191 00192 itk_component add dataDirMark { 00193 frame $itk_component(childsite).dataDirMark \ 00194 -borderwidth 2 00195 } {} 00196 00197 itk_component add dataDir { 00198 entry $itk_component(dataDirMark).entry \ 00199 -borderwidth 2 \ 00200 -validate all \ 00201 -validatecommand [code $this _validateCommand "dataDir" %P] 00202 } {} 00203 00204 itk_component add dataDirButton { 00205 button $itk_component(dataDirMark).button \ 00206 -image [YadaImages::get defaultFolder] \ 00207 -padx 5 \ 00208 -pady 0 \ 00209 -command [code $this _dataDirChooser] 00210 } {} 00211 00212 # status buttons 00213 itk_component add statusLabel { 00214 label $itk_component(childsite).statusLabel \ 00215 -text "Status:" \ 00216 -anchor nw 00217 } 00218 00219 itk_component add statusMark { 00220 frame $itk_component(childsite).statusMark \ 00221 -borderwidth 2 00222 } {} 00223 00224 itk_component add isActive { 00225 checkbutton $itk_component(statusMark).isActive \ 00226 -text "Active" \ 00227 -variable [scope _isActive] \ 00228 -command [code $this _mark "isActive"] 00229 } {} 00230 00231 itk_component add isComplete { 00232 checkbutton $itk_component(statusMark).isComplete \ 00233 -text "Complete" \ 00234 -variable [scope _isComplete] \ 00235 -command [code $this _mark "isComplete"] 00236 } {} 00237 00238 # more buttons 00239 itk_component add checkButton { 00240 button $itk_component(buttonFrame).checkButton \ 00241 -text "Check" \ 00242 -command [code $this _checkMethod] 00243 } 00244 00245 00246 # 00247 # bindings 00248 # 00249 00250 # script texts 00251 set text [$itk_component(script) childsite] 00252 bind $text <FocusOut> [code $this _mark "script"] 00253 bind $text <Leave> [code $this _mark "script"] 00254 bind $text <KeyPress> [code $this _mark "script"] 00255 00256 # 00257 # packing + gridding 00258 # 00259 grid rowconfigure $itk_component(childsite) 7 -weight 1 00260 00261 grid $itk_component(typeLabel) -sticky w -row 2 -column 0 00262 grid $itk_component(typeMark) -sticky ew -row 2 -column 1 -pady 10 00263 pack $itk_component(type) -fill both -expand 1 00264 00265 grid $itk_component(grammarLabel) -sticky ew -row 3 -column 0 00266 grid $itk_component(grammarNameMark) -sticky ew -row 3 -column 1 -pady 10 -columnspan 2 00267 pack $itk_component(grammarName) -fill both -expand 1 00268 00269 grid $itk_component(commandLabel) -sticky ew -row 4 -column 0 -pady 10 00270 grid $itk_component(commandMark) -sticky ew -row 4 -column 1 -pady 10 -columnspan 2 00271 pack $itk_component(command) -fill both -expand 1 00272 00273 grid $itk_component(machineLabel) -sticky ew -row 5 -column 0 -pady 10 00274 grid $itk_component(machineNameMark) -sticky ew -row 5 -column 1 -pady 10 -columnspan 2 00275 pack $itk_component(machineName) -fill both -expand 1 00276 00277 grid $itk_component(dataDirLabel) -sticky ew -row 6 -column 0 -pady 10 00278 grid $itk_component(dataDirMark) -sticky ew -row 6 -column 1 -pady 10 -columnspan 2 00279 pack $itk_component(dataDir) -fill both -expand 1 -side left 00280 pack $itk_component(dataDirButton) -side left 00281 00282 grid $itk_component(scriptLabel) -sticky new -row 7 -column 0 -pady 10 00283 grid $itk_component(scriptMark) -sticky news -row 7 -column 1 -rowspan 2 -pady 10 -columnspan 2 00284 pack $itk_component(script) -fill both -expand 1 00285 00286 grid $itk_component(statusLabel) -sticky w -row 9 -column 0 00287 grid $itk_component(statusMark) -sticky w -row 9 -column 1 00288 pack $itk_component(isActive) \ 00289 $itk_component(isComplete) -fill both -side left -expand 1 00290 00291 pack $itk_component(checkButton) -side top -fill x -pady 5 00292 00293 eval itk_initialize $args 00294 } 00295 00296 ## ---------------------------------------------------------------------------- 00297 ## init 00298 ## ---------------------------------------------------------------------------- 00299 body YadaMethods::init {} { 00300 if {$_isInitialized} { 00301 return 00302 } 00303 chain 00304 00305 # initialize the comboboxes 00306 set commands "" 00307 foreach item [getAllItems] { 00308 set command [$item cget -command] 00309 if {[lsearch $commands $command] < 0} { 00310 lappend commands $command 00311 } 00312 } 00313 eval $itk_component(type) insert list 0 [lsort -dictionary $_methodTypes] 00314 eval $itk_component(command) insert list 0 [lsort -dictionary $commands] 00315 00316 # read the grammars and machines 00317 eval $itk_component(grammarName) insert list end [.main getGrammarNames] 00318 eval $itk_component(machineName) insert list end "[.main getMachineNames] {}" 00319 00320 _select "<none>" 00321 } 00322 00323 ## ---------------------------------------------------------------------------- 00324 ## _select 00325 ## ---------------------------------------------------------------------------- 00326 body YadaMethods::_select {{methodName ""}} { 00327 00328 # get a method name from the combobox if we didn't provide one 00329 if {$methodName == ""} { 00330 set methodName [$itk_component(name) get] 00331 } 00332 set currentItem [getItem $methodName] 00333 if {$currentItem == ""} { 00334 printMessage "ERROR: method `$methodName' is unknown." error 00335 return 00336 } 00337 00338 # check if we didn't commit changes 00339 if {![_askChange]} { 00340 return 00341 } 00342 00343 # set the new active method 00344 setCurrentItem $currentItem 00345 00346 # update the name box 00347 set box $itk_component(name) 00348 set entries [[$box component list] get 0 end] 00349 set index [lsearch $entries $methodName] 00350 if {$index < 0} { 00351 error "ERROR: method `$methodName' not in combobox" 00352 } 00353 $box selection set $index $index 00354 $box delete entry 0 end 00355 $box insert entry 0 $methodName 00356 00357 # update the command box 00358 set box $itk_component(command) 00359 set command [$currentItem cget -command] 00360 set entries [[$box component list] get 0 end] 00361 set index [lsearch $entries $command] 00362 if {$index < 0} { 00363 error "ERROR: command `$command' not in combobox" 00364 } 00365 $box selection set $index $index 00366 $box delete entry 0 end 00367 $box insert entry 0 $command 00368 00369 00370 # update the boxes 00371 foreach aspect {type grammarName machineName} { 00372 set box $itk_component($aspect) 00373 set value [$currentItem cget -$aspect] 00374 set index [getIndexOfName [$box component list] $value] 00375 if {$index < 0} { 00376 error "ERROR: $aspect `$value' is unknown" 00377 } 00378 $box selection set $index $index 00379 set isEditable [$box cget -editable] 00380 if {!$isEditable} { 00381 $box configure -editable 1 00382 } 00383 $box delete entry 0 end 00384 $box insert entry 0 $value 00385 if {!$isEditable} { 00386 $box configure -editable 0 00387 } 00388 } 00389 00390 # update the script 00391 set text $itk_component(script) 00392 $text delete 1.0 end 00393 $text insert 1.0 [$currentItem cget -script] 00394 00395 # update the entries 00396 foreach entryName {dataDir} { 00397 set entry $itk_component($entryName) 00398 $entry delete 0 end 00399 $entry insert 0 [$currentItem cget -$entryName] 00400 } 00401 00402 # update the checkbuttons 00403 set _isActive [$currentItem cget -isActive] 00404 set _isComplete [$currentItem cget -isComplete] 00405 00406 # remove marking 00407 _unmark 00408 00409 # remember this selected name 00410 set _oldItem $methodName 00411 } 00412 00413 ## ---------------------------------------------------------------------------- 00414 ## _commit 00415 ## ---------------------------------------------------------------------------- 00416 body YadaMethods::_commit {} { 00417 00418 if {![chain]} { 00419 return 00420 } 00421 00422 set currentItem [getCurrentItem] 00423 00424 # set all aspects of the object 00425 foreach aspect {type grammarName command dataDir machineName} { 00426 $currentItem configure -$aspect [$itk_component($aspect) get] 00427 } 00428 00429 # set the script property of the object 00430 set text $itk_component(script) 00431 $currentItem configure -script [$text get 1.0 end] 00432 00433 # save the checkbuttons 00434 $currentItem configure -isActive $_isActive 00435 $currentItem configure -isComplete $_isComplete 00436 00437 # save data unique in comboboxes 00438 foreach aspect {type grammarName command machineName} { 00439 set box $itk_component($aspect) 00440 set value [$currentItem cget -$aspect] 00441 set listBox [$box component list] 00442 if {[getIndexOfName $listBox $value] < 0} { 00443 set entries [$listBox get 0 end] 00444 lappend entries $value 00445 $listBox delete 0 end 00446 eval $listBox insert 0 [lsort -dictionary $entries] 00447 } 00448 } 00449 00450 # remember this selected name 00451 set _oldItem [$currentItem cget -name] 00452 00453 # remove marking 00454 _unmark 00455 _select 00456 } 00457 00458 ## ---------------------------------------------------------------------------- 00459 ## _new 00460 ## ---------------------------------------------------------------------------- 00461 body YadaMethods::_new {} { 00462 00463 # ask for a new name 00464 set prd [iwidgets::promptdialog .prd \ 00465 -title "Yada - New method" \ 00466 -modality application \ 00467 -labeltext "Name:" \ 00468 -labelpos w] 00469 00470 set methodName [$itk_component(name) get] 00471 set entry [$prd component prompt] 00472 $entry configure -width 40 00473 $entry insert 0 $methodName 00474 00475 $prd center . 00476 $prd hide Apply 00477 $prd hide Help 00478 after idle "focus [$prd component prompt]" 00479 00480 set result [$prd activate] 00481 set methodName [$prd get] 00482 destroy $prd 00483 00484 if {!$result} { 00485 return 00486 } 00487 00488 set item [getItem $methodName] 00489 if {$item != ""} { 00490 set message "ERROR: method `$methodName' exists already." 00491 .main printStatus $message 00492 printMessage $message error 00493 return [_new] 00494 } 00495 .main printStatus "" 00496 00497 # build a new method 00498 set currentItem [getCurrentItem] 00499 setCurrentItem [$currentItem clone -name $methodName] 00500 .main printStatus "New method `$methodName'" 00501 00502 # store all aspects 00503 set box $itk_component(name) 00504 $box delete entry 0 end 00505 $box insert entry 0 $methodName 00506 _commit 00507 00508 # display it 00509 _select $methodName 00510 } 00511 00512 ## ---------------------------------------------------------------------------- 00513 ## _dataDirChooser 00514 ## ---------------------------------------------------------------------------- 00515 body YadaMethods::_dataDirChooser {} { 00516 focus $itk_component(dataDir) 00517 00518 set methodName [$itk_component(name) get] 00519 00520 set currentItem [getCurrentItem] 00521 set dataDir [$currentItem cget -dataDir] 00522 set directory [file dirname $dataDir] 00523 set selection [.fileSelector activate \ 00524 -directory $directory \ 00525 -title "Choose a data directory" \ 00526 -filter [list "*.log.gz *.xml.gz" "*log.gz" "*.xml.gz" "*"] \ 00527 -selection $dataDir] 00528 #-mode "singledir" \ 00529 00530 if {$selection != ""} { 00531 if {[llength $selection] > 1 || ![file isdirectory $selection]} { 00532 set message "ERROR: please select one directory." 00533 .main printStatus $message 00534 printMessage $message error 00535 return [_dataDirChooser] 00536 } else { 00537 .main printStatus "" 00538 $itk_component(dataDir) delete 0 end 00539 $itk_component(dataDir) insert 0 $selection 00540 _mark "dataDir" 00541 } 00542 } 00543 } 00544 00545 ## ---------------------------------------------------------------------------- 00546 ## _delete 00547 ## ---------------------------------------------------------------------------- 00548 body YadaMethods::_delete {} { 00549 00550 # get the method name 00551 set currentItem [getCurrentItem] 00552 set methodName [$currentItem cget -name] 00553 00554 # method "<none>" is undeleteable 00555 if {$methodName == "<none>"} { 00556 return 00557 } 00558 00559 # are you sure? 00560 set msg [iwidgets::messagedialog .msg \ 00561 -text "Are you sure that you want to delete method\n`$methodName'?" \ 00562 -title "Yada - Caution" \ 00563 -image [YadaImages::get question] \ 00564 -modality application \ 00565 -master $itk_interior] 00566 $msg buttonconfigure OK -text "Yes" 00567 $msg buttonconfigure Cancel -text "No" 00568 $msg center . 00569 set result [$msg activate] 00570 destroy $msg 00571 if {!$result} { 00572 return 00573 } 00574 00575 # delete the data 00576 unsetItem $currentItem 00577 itcl::delete object $currentItem 00578 00579 # update the names 00580 set box $itk_component(name) 00581 set index [getIndexOfName [$box component list] $methodName] 00582 if {$index >= 0} { 00583 $box delete list $index $index 00584 } 00585 00586 # show something 00587 _select "<none>" 00588 } 00589 00590 ## ---------------------------------------------------------------------------- 00591 ## _defaults 00592 ## ---------------------------------------------------------------------------- 00593 body YadaMethods::_defaults {{fileName ""}} { 00594 00595 # possible variables 00596 set methodTypes "netsearch arcconsistency pruning isearch frobbing {incremental completition} gls" 00597 00598 if {$fileName == ""} { 00599 # built in default methods or ... 00600 getYadaDefaultMethods 00601 } else { 00602 # ... configured methods 00603 if {[catch {source $fileName} errMsg]} { 00604 bgerror "There's an error in your methods init file $fileName!" 00605 } 00606 } 00607 00608 # required <none> method 00609 lappend methodTypes "<none>" 00610 YadaMethod ::#auto \ 00611 -name "<none>" \ 00612 -type "<none>" \ 00613 -grammarName "<none>" \ 00614 -machineName "<none>" 00615 00616 # assert methods and types into the class 00617 set methods [itcl_info objects -class YadaMethod] 00618 set _methodTypes [lsort -dictionary $methodTypes] 00619 foreach method $methods { 00620 set methodName [$method cget -name] 00621 set isValid 1 00622 00623 # validation checks: 00624 # (a) check if the method type is known 00625 # (b) check if method already exists 00626 # (c) check if the used grammar exists 00627 # (d) check if the methods data store is unique 00628 00629 # (a) 00630 set methodType [$method cget -type] 00631 if {[lsearch $_methodTypes $methodType] < 0} { 00632 printMessage \ 00633 "Unknown method type $methodType! 00634 Known method types are `$_methodTypes' 00635 ... ignoring method `$methodName'." error 00636 set isValid 0 00637 itcl::delete object $method 00638 } 00639 00640 # (b) 00641 if {$isValid} { 00642 set item [getItem $methodName] 00643 if {$item != ""} { 00644 printMessage "Method `$methodName' already exists!" error 00645 set isValid 0 00646 } 00647 } 00648 00649 # (c) 00650 if {$isValid} { 00651 set grammarName [$method cget -grammarName] 00652 set grammar [.main getGrammar $grammarName] 00653 if {$grammar == ""} { 00654 printMessage \ 00655 "Grammar `$grammarName' is unknown! 00656 ... ignoring method `$methodName'." error 00657 set isValid 0 00658 } 00659 } 00660 00661 # (d) 00662 if {$isValid} { 00663 set methodDataDir [$method cget -dataDir] 00664 if {[info exists dataDirs($methodDataDir)]} { 00665 printMessage \ 00666 "`$methodName' uses the same data directory as $dataDirs($methodDataDir)! 00667 ... ignoring method `$methodName'." error 00668 set isValid 0 00669 } else { 00670 set dataDirs($methodDataDir) $methodName 00671 } 00672 } 00673 00674 if {$isValid} { 00675 setItem $method 00676 } else { 00677 itcl::delete object $method 00678 } 00679 } 00680 00681 # just to be tidy 00682 array unset dataDirs 00683 .main printStatus "... built [llength $methods] methods" 00684 } 00685 00686 ## ---------------------------------------------------------------------------- 00687 ## getActiveMethods 00688 ## ---------------------------------------------------------------------------- 00689 body YadaMethods::getActiveMethods {args} { 00690 set result "" 00691 foreach method [eval getAllItems $args] { 00692 if {[$method cget -isActive]} { 00693 lappend result [$method cget -name] 00694 } 00695 } 00696 00697 return $result 00698 } 00699 00700 ## ---------------------------------------------------------------------------- 00701 ## _mark 00702 ## ---------------------------------------------------------------------------- 00703 body YadaMethods::_mark {aspect} { 00704 00705 switch $aspect { 00706 "script" { 00707 set currentItem [getCurrentItem] 00708 set oldData [string trim [$currentItem cget -$aspect]] 00709 set newData [string trim [$itk_component(script) get 1.0 end]] 00710 } 00711 "dataDir" { 00712 set currentItem [getCurrentItem] 00713 set oldData [glob -nocomplain [$currentItem cget -$aspect]] 00714 set newData [glob -nocomplain [$itk_component($aspect) get]] 00715 } 00716 "isActive" { 00717 set currentItem [getCurrentItem] 00718 set oldData [$currentItem cget -isActive] 00719 set newData $_isActive 00720 set aspect "status" 00721 } 00722 "isComplete" { 00723 set currentItem [getCurrentItem] 00724 set oldData [$currentItem cget -isComplete] 00725 set newData $_isComplete 00726 set aspect "status" 00727 } 00728 default { 00729 set oldData "" 00730 set newData "" 00731 } 00732 } 00733 00734 chain $aspect $newData $oldData 00735 } 00736 00737 ## ---------------------------------------------------------------------------- 00738 ## activationHandle 00739 ## ---------------------------------------------------------------------------- 00740 body YadaMethods::activationHandle {} { 00741 chain 00742 00743 # refresh the grammars 00744 $itk_component(grammarName) delete list 0 end 00745 eval $itk_component(grammarName) insert list end [.main getGrammarNames] 00746 00747 # refresh the machines 00748 $itk_component(machineName) delete list 0 end 00749 eval $itk_component(machineName) insert list end [.main getMachineNames] 00750 00751 # redisplay the current selection 00752 _select 00753 } 00754 00755 ## ---------------------------------------------------------------------------- 00756 ## _checkMethod 00757 ## ---------------------------------------------------------------------------- 00758 body YadaMethods::_checkMethod {} { 00759 set currentItem [getCurrentItem] 00760 if {$currentItem == ""} { 00761 return 00762 } 00763 $currentItem check 00764 _select 00765 }