UCMDs: Documententation and implementation do not match...

SALT, SPICE, Subversion, etc...

UCMDs: Documententation and implementation do not match...

Postby MBaas on Tue Feb 14, 2012 1:16 pm

UserCommands.1.21.pdf states on page 9:
When your command is used, your function will only be called if the arguments and
switches comply with the rules that you have declared. The framework will package
the argument and switch(es) into a namespace and pass this as the second element of
the argument to RunArgin our example.

However, when running a cmd that has an empty parse-string (i.e. no arguments, so that "optional" arguments might be used "If you don‟t declare the number of arguments, any number of arguments will be accepted (including 0)."), the "Arg" that is passed to Run is a string (containing everything entered after the name of the command), not a namespace.

So...are u going to adopt the doco or modify the program?
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: UCMDs: Documententation and implementation do not match.

Postby DanB|Dyalog on Tue Feb 14, 2012 7:54 pm

Page 9 of the V13 doc says: "The Spice framework upon which user commands is built allows you to define switches that your command will accept. If the Parse element for your command is empty (as defined in your List function), Run„s 2nd argument will simply contain everything following the command name, and you can interpret it any way you like".

So the doc is already correct.

If you put anything else in Parse THEN the parsing rules in it will apply.
DanB|Dyalog
 

Re: UCMDs: Documententation and implementation do not match.

Postby MBaas on Tue Feb 14, 2012 8:20 pm

Ok, thanks - I see I should update my doc-links ;-)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany


Return to Source Code Management

Who is online

Users browsing this forum: No registered users and 1 guest