Tk Library Source Code

View Ticket
Login
Ticket UUID: 2988486
Title: cmdline with ::argv does not update ::argc
Type: Bug Version: None
Submitter: glennjnn Created on: 2010-04-16 18:32:01
Subsystem: cmdline Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2010-05-28 02:09:32
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2010-05-27 19:09:32
Description:
I realize this is not strictly a cmdline bug because it can work on any list of arguments.  However, I realized that if the ::argv global varname is passed then ::argc will not be updated, even though $::argv changes.

I can see two ways to address this:
1. simply note it in the documentation.
2. add a special case, if the argvVar is "::argv", then "set ::argc [llength $argv]"
User Comments: andreas_kupries added on 2010-05-28 02:09:32:

allow_comments - 1

Added a note to the documentation.

tomk added on 2010-04-17 03:48:06:
Andreas,
A trigger on ::argv would be a simple solution and I wouldn't think there would be bad side effects. I've modified ::argv in several applications and followed it with an update of ::argc. I don't think a trigger on ::argv would break mine or similar code. My personal feeling is I don't care if the change is made or not.
tomk