Tk Library Source Code

View Ticket
Login
Ticket UUID: 3106443
Title: invalid option processing in tooltip::tooltip
Type: Bug Version: None
Submitter: daapp Created on: 2010-11-10 04:26:32
Subsystem: tklib :: tooltip Assigned To: hobbs
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2016-11-24 13:43:35
Resolution: Fixed Closed By: arjenmarkus
    Closed on: 2016-11-24 13:43:35
Description:
tooltip::tooltip try to process argument starting with "-" as option

Example:

tooltip::tooltip .e "-10.0 .. 10.0"

generate error

unknown option "-10.0 .. 10.0": should be -index, -items or -tag
    while executing
"register .e {-10.0 .. 10.0}"
    (in namespace inscope "::tooltip" script line 1)
    invoked from within
"::namespace inscope ::tooltip {register .e {-10.0 .. 10.0}}"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 [namespace code "register [list $w] $args"]"
    (procedure "tooltip::tooltip" line 35)
    invoked from within
"tooltip::tooltip .e [msgcat::mc "$minPosition .. $maxPosition"]"
    (procedure "::widget::form1::Snit_constructor" line 115)
    invoked from within

Alse tooltip::tooltip have no "--" parameter, to specify end of options.
User Comments: arjenmarkus added on 2016-11-24 13:43:35:
I have applied the patch that was provided and written a small test program. This worked as intended.

Attachments: