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

[Xotcl] xo beginner

From: Mads Linden <ml_at_electronicfarm.com>
Date: Sat, 25 Jun 2005 03:08:40 +0200

hi all
 
i am trying to learn XO....... so be nice :)
 
the question:
 

#####

Class Project
 
Project instproc init {} {
        puts "INIT"
}
 
Project instproc getarg {value} {
        puts "getarg : $value"
}


Project .p -getarg 1

#####

Since xotcl allow method call in the same line as the creation of the
instance I offcourse tried that out ==

This gives me

>> getarg : 1
>> INIT

I expected it to call the constructor (init) before method.



Regards

Mads