Menu

#4 dp_SetCheckCmd example does not work

open
None
5
2010-08-29
2002-08-15
No

Hi.

In the man page an example for dp_setCheckCommand is
given.

proc MyCheck {cmd args} {
set argc [llength $args]
case $cmd in {
Safe {return}
puts {return}
eval {return -code continue}
set {
if {$argc == 2} {
error "Permission to set
variables denied"
} else {
return
}
}
}
return -code break
}

If an rpc command is invoked with args, this does not
work as wanted. The whole command (including args) is
passed as a string to MyCheck, so only cmd has a
meaningfull value, but unexpected...

Michael Schlenker

Discussion

  • John McGehee

    John McGehee - 2010-08-29
    • assigned_to: nobody --> voominc
     
  • John McGehee

    John McGehee - 2010-08-29

    I may have fixed this so that the example works as given. I'll check it out as I make the next release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.