Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0886e655fd6f11924c864bca2174cad53ab7f703
Ticket: 1574835fffffffffffffffffffffffffffffffff
wrong#args problem in [apply] guts
User & Date: dkf on 2006-10-10 21:35:17
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    % namespace ensemble create -command bar -map {id
    {const foo}}
    ::bar
    % proc const val { return $val }
    % proc alias {object slot = command args} {
         set map [namespace ensemble configure $object -map]
         dict set map $slot [linsert $args 0 $command]
         namespace ensemble configure $object -map $map
     }
    % proc method {object name params body} {
         set params [linsert $params 0 self]
         alias $object $name = ::apply [list $params $body
    ::] $object
     }
    % method bar boo x {return "[expr {$x*$x}] - $self"}
    % bar ?
    unknown or ambiguous subcommand "?": must be boo, or id
    % bar boo
    wrong # args: should be "bar boo"
    
    That's a wrong error message, should be:
      wrong # args: should be "bar boo x"
    
    
  4. foundin changed to: "obsolete: 8.5a5"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dkf"
  10. subsystem changed to: "22. [proc] and [uplevel]"
  11. title changed to: "wrong#args problem in [apply] guts"
  12. type changed to: "Bug"