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

[Xotcl] A question about parameter and default values.

From: Shishir Ramam <sramam_at_gmail.com>
Date: Sat, 26 May 2007 09:47:26 -0700

I'm using ActiveState's 8.4 distribution on Windows XP, and am unable to
explain the behaviour in the example below.

Shouldn't '-exact' be allowed as the default initializer for match? It seems
to have something to do with the
leading '-' since removing it seems to create the class Foo without issue.

Any help much appreciated.

thanks,
-shishir

C:\Tools\Tcl\lib\xotcl1.5.3>tclsh
% package require XOTcl
1.5.3
% namespace import xotcl::*
% Class Foo -parameter {{match -exact}}
 during '::Foo parameter'
% set errorInfo
 during '::Foo parameter'
    ::Foo ::xotcl::Object->configure
    ::xotcl::Class ::xotcl::Class->create
    ::xotcl::Class ::xotcl::Class->unknown
    invoked from within
"Class Foo -parameter {{match -exact}}"

Changing -exact to exact, the error is resolved.
% Class Foo -parameter {{match exact}}
::Foo