configbody

class bb {
   inherit itk::Widget
   itk_option define -activeClientOnly activeClientOnly ActiveClientOnly 1
   constructor { args } {  
    eval itk_initialize $args
}
}

configbody bb::activeClientOnly {
    puts "abc"
    if  { $itk_option(-activeClientOnly) == 0 } {
 puts "zero"
    } else {
    }
 
}

class aa {
   inherit bb
   constructor { args } {

   
   } {
  
   eval itk_initialize $args
   }

}

aa .c -activeClientOnly 1
.c configure -activeClientOnly 0

posted @ 2012-08-04 17:27  greencolor  阅读(121)  评论(0编辑  收藏  举报