Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 92d334ced07651b16c54990ef9186a08ddd1d00a2472df365b1c786d26fd39af
Ticket: 2935659fffffffffffffffffffffffffffffffff
info class forward returning error instead of empty list
User & Date: dkf on 2024-05-23 15:42:40
Changes

  1. closedate changed to: "2460454.15463293"
  2. closer changed to: "dkf"
  3. comment changed to:
    [info class forward className methodName] returns an error "prefix argument list not available for this kind of method" when it is used on a methodName that has no forward defined for it.
    
    The documentation states:
    "info class forward class method
    This subcommand returns the argument list for the method forwarding called method that is set on the class called class. "
    
    So, one would expect to get an empty list if there is no forward defined for a class, since there is no other way of introspecting a class method for any forwards.
    The error given cannot be remedied by the programmer, since there is nothing one can do but use an unecessary [catch] to avoid it. Not having a forward is not an error for a method.
    
    An empty list would convey the same meaning with the error message, i.e. the unavailability of an argument list, but in a non-exceptional manner.
    
  4. icomment:
    You can do `info class methodtype` and `info object methodtype` to get a good guess going as to how to read what you've got. That was in TIP #381.
    
  5. login: "dkf"
  6. mimetype: "text/x-markdown"
  7. resolution changed to: "Invalid"
  8. severity changed to: "Minor"
  9. status changed to: "Closed"