Tk Library Source Code

Ticket Change Details
Login
Overview

Artifact ID: ab346fe00debf84ae40f9391b169c804f7bad4a05b82b2e7439ff4e07e96307d
Ticket: f4b93930510520d92e1fa58b38c7eac72b8432a4
Error on ctext when C comments enabled
User & Date: geballin 2020-04-22 20:02:13
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    In ctext, sometimes we can get the error when using ctext::enableComments :
        can't read "length": no such variable
        can't read "length": no such variable
            while executing
        "$win index "$index + $length chars""
            (procedure "ctext::comments" line 26)
            invoked from within
        "ctext::comments .client.right.text 1"
            ("after" script)
    
    This is because the length variable is not verified if defined before use.
    
    Patch file for ctext.tcl file is :
    --- ctext.tcl	2013-03-26 02:46:44.000000000 +0100
    +++ ctext.tcl.new	2020-04-22 22:42:55.163217426 +0200
    @@ -670,6 +670,10 @@
         while 1 {
     	set index [$win search -count length -regexp $commentRE $startIndex end]
     
    +	if {![info exists length]} {
    +	    break
    +        }
    +
     	if {$index == ""} {
     	    break
     	}
    
  5. foundin changed to: "0.7"
  6. is_private changed to: "0"
  7. login: "geballin"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6dcd7ca00fdbf25f6645f6a67a11668e7b5ef099"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "geballin"
  14. subsystem changed to: "tklib :: ctext"
  15. title changed to: "Error on ctext when C comments enabled"
  16. type changed to: "Patch"