[Xotcl] NX question

Gustaf Neumann neumann at wu-wien.ac.at
Wed Oct 27 08:39:25 CEST 2010


Certainly, all attributes can be set using the dash notation.
The attributes do not have the variable arguments problem,
for setting, always exactly one argument is required.

Although syntactically the same, there is a big difference
between XOTcl 1.* and nx concerning attributes:
in xotcl, calls like "-a 1" in "C new -a 1" were plain 
method calls;
in nx, these are object parameters, which are set using the
same mechanism as setting nonpositional arguments for
a method (using the same value checker, default
mechanisms, can be set optional or not etc.). With nx,
it is possible to define e.g. protected setter functions, etc.

On 26.10.10 22:37, Victor Mayevski wrote:
> Thank you Gustaf, that makes sense. I have also found that I can still do attribute settings the old - "dash" way, so, most of my code should be fine.
if you use XOTcl 2.0, practically everything is compatible.
Since it is possible to use nx and XOTcl 2.0 in the
same interpreter, migration does not mean to change
everything on a certain date, but it can be done in a
piecemeal manner.

-gustaf neumann


More information about the Xotcl mailing list