On Sunday 19 September 2004 09:37, William Coleda wrote:
> Didn't __init used to get magically called when you new'd a class? I just
> had Tcl go all pear shaped after updated to cvs-latest, and tracked it down
> to my instances of a class (TclWord) not getting intialized. Which I don't
> seem to have done manually before.
>
>   .local int tclword
>   tclword = find_type "TclWord"
>   word = new tclword
>   word->__init()
>
> Before an update, I just needed the first 3 to have a fully initialized
> object. Now I need the last as well. Did I miss a memo? (again? =-)
Can you give an example how I can reproduce his?
__init is called if no BUILD property is set on the class object.

make test in languages/tcl runs with and without 'word->__init()'.

BTW, word."__init"() is AFAIK the correct syntax.
I did not even knew that -> also works :-)
The unquoted version (word.__init()) is an indirect call (the name of the 
method to call is in the variable __init)...

jens

Reply via email to