View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] Probable bug: no method calls with "next" & init

From: Gustaf Neumann <Gustaf.Neumann_at_wu-wien.ac.at>
Date: Mon, 5 Feb 2001 22:28:18 +0100 (CET)

>>>>> "RH" == Rick Hedin <rhedin_at_aquifer.geology.uiuc.edu> writes:

RH> Hi Kristoffer.
RH> This behavior seems correct. You are trying to pass three arguments:
RH> 1. myArg 2. -whatever 3. niceSystem
RH> to one formal parameter:
RH> arg
RH> We could send one argument:
RH> next {myArg -whatever niceSystem}
 
  in the general case, you will prefer
 
        next [list myArg -whatever niceSystem]
 
  to get the tcl substitions correct.
 
RH> or use the special properties of the args keyword:
RH> Foo instproc init {args} { . . .
 
RH> Am I looking at this right?
 
  technically yes.
 
  Somehow, i have the feeling, that Kristoffer intended a class to the
  method "whatever". Why not use:

     Class Bar -superclass Foo
     Bar instproc init {} {
       next myArg
       [self] whatever niceSystem
     }
 
 -gustaf