Tk Library Source Code

View Ticket
Login
Ticket UUID: 472259
Title: getoptions -- help or error?
Type: Bug Version: None
Submitter: glennjnn Created on: 2001-10-17 22:08:52
Subsystem: cmdline Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2013-07-04 17:24:54
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
In the ::cmdline::getoptions procedure, there is no
way to differentiate between a user who wants help
and passes a -? or -help option, and a user who has
entered an unknown option.  In both cases, the
getoptions proc calls
    error [cmdline::usage $optlist $usage]

I would suggest the attached patch which:
1. changes [error] to [return -code -1] if the user
   wants help, to differentiate from a real error
2. changes the error string if a real error
   occurred.
User Comments: andreas_kupries added on 2001-11-01 00:10:37:
Logged In: YES 
user_id=75003

This changes the public interface, hence an update of the 
major version number for this package and tcllib is in 
order. Marking this item with

MAJOR_VERSION_UPDATE

to find it and others of thre same kind in a search.

glennjnn added on 2001-10-18 05:12:29:

File Added - 12132: cmdline.diff

Attachments: