uplevel

class Imagenumbers {
 
   inherit itk::Widget

   itk_option define -command command Command ""

   constructor { args } { }
}

 

body Imagenumbers::constructor { args } {
    # create dummy gEntry to allow options to be kept!
    itk_component add dummy {
 gEntry $itk_interior.dummy
    } {
 usual
    }
    eval itk_initialize $args
}

 

body Imagenumbers::execute { an_index } {
    if {$itk_option(-command) != ""} {
 set l_num_list [uncompressNumList [$itk_component(entry$an_index) query]]
 uplevel \#0 $itk_option(-command) $templates_by_index($an_index) [list $l_num_list]

##     Here just run as
##     Indexwizard::chooseImages $templates_by_index($an_index) [list $l_num_list]
    }
}

 

body Indexwizard::constructor { args } {
    itk_component add image_numbers {
 Imagenumbers $itk_interior.sfp.isf.in \
     -command [code $this chooseImages]
    }
}

 


 

posted @ 2011-09-05 23:19  greencolor  阅读(126)  评论(0编辑  收藏  举报