Tk Library Source Code

View Ticket
Login
Ticket UUID: 3608951
Title: TEPAM: Help text shows incorrect argument order
Type: Bug Version: None
Submitter: droll Created on: 2013-03-24 13:40:23
Subsystem: tepam Assigned To: droll
Priority: 3 Low Severity:
Status: Closed Last Modified: 2013-03-26 05:27:02
Resolution: Fixed Closed By: droll
    Closed on: 2013-03-25 22:15:25
Description:
The argument order of the help text of procedures defined in the Tk style (unnamed arguments first - named arguments later, [named_arguments_first=0]) is incorrect. Example:

tepam::procedure MyProc {
-named_arguments_first 0
-short_description "Help generation demonstration"
-description "Command to demonstrate the help text generation"
-args {
{Unnamed1 -optional -description "1st unnamed argument"}
{Unnamed2 -optional -description "2nd unnamed argument"}
{-Named1 -optional -description "1st named argument"}
{-Named2 -optional -description "2nd named argument"} }
} {
puts "MyProc"
}

MyProc -help

| NAME
|       MyProc - Help generation demonstration
| SYNOPSIS
|       MyProc
|             [-Named1 <Named1>]
|                1st named argument
|             [-Named2 <Named2>]
|                2nd named argument
|             [<Unnamed1>]
|                1st unnamed argument
|             [<Unnamed2>]
|                2nd unnamed argument
| DESCRIPTION
|       Command to demonstrate the help text generation

The following help text would be expected (unnamed argument listed first, named argument listed afterwards).

| NAME
|       MyProc - Help generation demonstration
| SYNOPSIS
|       MyProc
|             [<Unnamed1>]
|                1st unnamed argument
|             [<Unnamed2>]
|                2nd unnamed argument
|             [-Named1 <Named1>]
|                1st named argument
|             [-Named2 <Named2>]
|                2nd named argument
| DESCRIPTION
|       Command to demonstrate the help text generation

This bug affects only the help text generation. It is not affecting the behavior of the procedure call.
A fix for the TEPAM package is available, and once the TEPAM author has write/commit access to the new TclLib repository (Fossil) the fix will be commited.
User Comments: andreas_kupries added on 2013-03-26 05:27:02:
Commit: https://core.tcl.tk/tcllib/info/e040e29b2b

droll added on 2013-03-26 05:15:25:

allow_comments - 1

This has been fixed in TEPAM 0.4.1 that has been commited on March, 25th, 2013.