[Xotcl] Changing method name and Filters

Gustaf Neumann neumann at wu-wien.ac.at
Wed Aug 29 13:47:12 CEST 2001


On Wednesday 29 August 2001 00:05, Sheik Yussuff wrote:
> Is there a way for one filter (A say) to change the name of a method
> and pass this new method name with the same args to the next
> filter in sequence(B say)?

 you want to call from D->f1 via next the method C->f2?

 Class C
 C instproc f1 ....
 C instproc f2
 Class D -superclass C
 D instproc f1 {} {
    next
 }

 no, you can't do it. you can do certainly the following:

  D instproc f1 {} {
    if {....some-condition...} {
       [self] f2
    } else {
      next
    }
 }

 -gustaf
PS: there is a way to call methods of a class directly, 
but i won't recommend it, since it is going to change in the
next releaese, when XOTcl will be a well behaved extension, and
everything is moved into the xotcl namespace




More information about the Xotcl mailing list