<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#cccccc" text="#000000">
With version 1.3.0 I've tried to extend the class to support a new
option in using the following code:
<br>
<br>
<tt>xotcl::nonPosArgs proc in { allowedValues argName args} {
<br>
if { [lsearch $allowedValues $args] == -1 } {
<br>
error "Invalid value |$args| for option $argName (allowed values:
[join $allowedValues {, }])"
<br>
}
<br>
}
<br>
</tt><br>
example:
<br>
<tt><br>
Class create A
<br>
A proc y {{{-q:in {add remove}} add}} {} {
<br>
puts $q
<br>
}
<br>
A y; # prints add
<br>
A t -q bad; # throw an error
<br>
A y -q remove; # prints remove
</tt><br>
<br>
With version 1.3.1 this code doesn't work anymore and the error
returned is:
<br>
<br>
::xotcl::nonPosArgs: unable to dispatch method 'in {add remove}'
<br>
<br>
How can I change the prototype to make it work again ?
<br>
<br>
Thanks,
<br>
Giovanni.
<DIV><FONT size=2><FONT
face="Courier New">--------------------------------------------------------------------<BR>CONFIDENTIALITY
NOTICE<BR>This message and its attachments are addressed solely to the
persons<BR>above and may contain confidential information. If you have
received<BR>the message in error, be informed that any use of the content
hereof<BR>is prohibited. Please return it immediately to the sender and
delete<BR>the message. Should you have any questions, please contact us
by<BR>replying to </FONT><A href="mailto:webmaster@telecomitalia.it"><FONT
face="Courier New">webmaster@telecomitalia.it</FONT></A><FONT
face="Courier New">.<BR> Thank
you<BR>
</FONT><A href="http://www.telecomitalia.it"><FONT
face="Courier New">www.telecomitalia.it</FONT></A><BR><FONT
face="Courier New">--------------------------------------------------------------------</FONT></FONT></DIV></body>
</html>