[Xotcl] non-positional arguments and init proc

Shishir Ramam sramam at gmail.com
Wed Nov 8 04:36:32 CET 2006


I must be missing something here - but are non-positional arguments not
permitted on the init proc?
A transcript of my attempts below...

thanks in advance for any help.
-shishir

% Class foo -parameter {{-a "apple"}}
::foo
% foo instproc init {{-a "apple"} args} {}
% foo f
::f
% foo f -a "banana"
::f: unable to dispatch method 'a' during '::f a'
% foo f a "banana"
::f
% foo instproc init {{-a "apple"} args} { puts "a=$a args=$args" }
% foo f a "banana"
a=apple args=a banana
::f
% foo f -a "banana"
::f: unable to dispatch method 'a' during '::f a'
% foo instproc init {{a "apple"} args} { puts "a=$a args=$args" }
% foo f a "banana"
a=a args=banana
::f
%

-- 
The point of living and of being an optimist, is to be
foolish enough to believe the best is yet to come.
  - Peter Ustinov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20061107/3b132158/attachment.html


More information about the Xotcl mailing list