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

Re: [Xotcl] non-positional arguments and init proc

From: Gustaf Neumann <>
Date: Sat, 11 Nov 2006 17:49:20 +0100

Shishir Ramam schrieb:
> I must be missing something here - but are non-positional arguments
> not permitted on the init proc?
> A transcript of my attempts below...
Dear Shishir,

The recommendation is, not to use nonposargs in init, since providing
values in the
"-" syntax conflicts syntactically with object configuration.

You can use nonposargs in "init" it with some more syntax
like in the following example e.g. in factory methods:

   Class foo -parameter {{-a "apple"}}
   foo instproc init {{-a "apple"} args} { puts a=$a}
   foo f
   foo f [list -init -a "banana"]

See as well:

best regards
-gustaf neumann