No registered users in community xowiki
in last 10 minutes
in last 10 minutes
XOTcl/NX mailing list by object move?
From: Koen Danckaert <koen_at_retarget.com>
Date: Mon, 27 Mar 2006 18:33:04 +0200
> haveing listed these options, "::xotcl::mycmd" looks reasonale
> to me, since it constructs a tcl command and avoids the "[self]"
> in a similar way as "::xotcl::my".
I agree with this. "myvar" and "mymethod" are at the same level as "my", which has the advantage that there is a clear semantical distinction from "my". E.g. an easy explanation in a tutorial would be:
"my foo args" calls a method on the current object, "mycmd foo args" constructs the same command as a list but does not execute it.
This is more difficult to explain for the methodname variant, since it is clear that "my cmd foo args" actually _does_ execute a method.
The argument that "myvar/mycmd" can only be used for the current object, also holds for "my". In that case you have to use the non-shorthand notation.
Concerning the choice between myproc/mymethod/mycmd/mycode/... that I'll leave up to Gustaf ;-)
Koen
Date: Mon, 27 Mar 2006 18:33:04 +0200
> haveing listed these options, "::xotcl::mycmd" looks reasonale
> to me, since it constructs a tcl command and avoids the "[self]"
> in a similar way as "::xotcl::my".
I agree with this. "myvar" and "mymethod" are at the same level as "my", which has the advantage that there is a clear semantical distinction from "my". E.g. an easy explanation in a tutorial would be:
"my foo args" calls a method on the current object, "mycmd foo args" constructs the same command as a list but does not execute it.
This is more difficult to explain for the methodname variant, since it is clear that "my cmd foo args" actually _does_ execute a method.
The argument that "myvar/mycmd" can only be used for the current object, also holds for "my". In that case you have to use the non-shorthand notation.
Concerning the choice between myproc/mymethod/mycmd/mycode/... that I'll leave up to Gustaf ;-)
Koen