Tk Library Source Code

View Ticket
Login
Ticket UUID: 3613644
Title: incorrect namespace formatting results in no vars defined
Type: Bug Version: None
Submitter: blacksqr Created on: 2013-05-21 06:11:10
Subsystem: tepam Assigned To: droll
Priority: 5 Medium Severity: Minor
Status: Deleted Last Modified: 2013-05-31 19:14:54
Resolution: Fixed Closed By: aku
    Closed on: 2013-05-31 19:14:54
Description:
The procedure "ProcedureArgumentEvaluation" incorrectly assumes that if a procedure name returned by [info level -1] doesn't start with "::" then the procedure isn't qualified with a namespace designation at all, neglecting the possibility of a relative namespace qualifier.  This leads to failure to match the called procedure with its definition stored in array ProcDef, and no arguments corresponding to command line flags are defined.

The problem is illustrated in the attached file.  A tepam procedure is defined, then called first with an absolute namespace qualifier, then again with a relative qualifier.  The first call succeeds, the second fails.

The "if" statement starting at line 642 appears to be the cause of the problem.  Replacing the entire "if" statement with the line "set ProcName [uplevel 2 "info command $ProcName"]" appears to fix the problem (only lightly tested).

tepam version 0.4.0
User Comments: droll added on 2013-05-25 13:26:30:

allow_comments - 0

blacksqr added on 2013-05-25 11:28:34:
I have downloaded version 0.4.1 from fossil.  It passes the test script and I have put it into my application where it works fine.  I consider the issue closed.

droll added on 2013-05-24 21:15:11:
Stephen,
Please check my comment I posted on May 21. For me this issue is already fixed in the newest package that is inside the Fossil repository (revision 0.4.1 from March 25th). Please confirm.
Thanks,
Andreas

andreas_kupries added on 2013-05-21 23:37:14:
Better quoting would be

set ProcName [uplevel 2 [list info command $ProcName]]"

in case proc name contains spaces.

blacksqr added on 2013-05-21 13:12:50:

File Added - 463452: tepam_patched.tcl

blacksqr added on 2013-05-21 13:11:11:

File Added - 463451: test.tcl

Attachments: