<div>Hello,</div>
<div> </div>
<div> I am trying to extend nonposArgs to include more checks and I am having a hard time. I have gotten basic checks working, but I am not able to get some of the more complicated checks working.</div>
<div> </div>
<div> The tutorial shows that the syntax for extending nonposArgs is:</div>
<div> </div>
<div> <em><font face="Comic Sans MS" color="#888888">someobject|someclass</font></em> <tt><strong><font face="Helvetica">proc|instproc</font></strong></tt> methodName {?optional arguments? argName args} {<br> ...<br>}<br>
</div>
<div>I have not been able to get the ?optional arguments? to work.</div>
<div> </div>
<div>Example:</div>
<div> </div>
<div>I am trying to get some checks done that will check for specific values of the Arg. I would like to be able to pass those values into the check.</div>
<div> </div>
<div>xotcl::nonposArgs proc RANGE {allowedRange argName args} {</div>
<div>.....code to verify the range</div>
<div>}</div>
<div> </div>
<div>The syntax to use this would be similar to:</div>
<div> </div>
<div>Class Foo</div>
<div>Foo instproc setMtu {{-mtu:RANGE 54-65535 "1500"}} {} {</div>
<div>....</div>
<div>}</div>
<div> </div>
<div>This is similar to what Giovannni Cristelli asked in the post titled XOTcl extending nonPosArgs class from November 2004.</div>
<div> </div>
<div>Is there any way to do this currently? I am trying to replace a bloated package that is currently being used which has many of these checks available. I have tried many combinations of syntax to get this to work and have not been able to figure it out.
</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Shawn</div><span></span><span class="sg">
<div> </div></span>