[PD-dev] [ pure-data-Patches-1670440 ] 8.5 tcl help browser bug

SourceForge.net noreply at sourceforge.net
Wed Dec 19 14:00:58 CET 2007


Patches item #1670440, was opened at 2007-02-28 01:49
Message generated for change (Settings changed) made by zmoelnig
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1670440&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: bugfix
>Status: Pending
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Ivica Ico Bukvic (ico_bukvic)
Assigned to: Miller Puckette (millerpuckette)
Summary: 8.5 tcl help browser bug

Initial Comment:
This help browser bug using CVS and tcl/tk 8.5 has been present since at least last fall. After digging through the code, I found the following:

proc doc_make_listbox {base dir count} {
    # check for [file readable]? 
    if { [info tclversion] >= 8.5 } {
        # requires Tcl 8.5 but probably deals with special chars better
#        destroy {expand}[lrange [winfo children $base] [expr {2 * $count}] end]
    } else {

The comment before "destroy" in effect disables destroying of children widgets and causes errors whenever I have more than one column open and try to click on a column preceding one that is already created. The error reported is that the "listbox1-list already exists" and the only way around is to close the help browser and reopen it. This obviously prevents going up the file tree once a particular subfolder has been opened which obviously means it is a non-lethal bug, but nonetheless annoying. 

Thus, the "else" clause only affects non 8.5 versions and as such causes pd with tcl/tk 8.5 to be broken.

I just checked this out and the 8.4 syntax does work on 8.5 but in the current code it is never accessed due to the existing "if" statement. The new fix simply comments the "if" and "else" statements making the 8.4 style of closing children widgets mandatory for all versions, and since it appears that 8.4 code works fine with tcl/tk 8.5, this appears to be a universal fix for this issue.

Please see attached (diff -uw against the fresh CVS checkout).


----------------------------------------------------------------------

Comment By: Miller Puckette (millerpuckette)
Date: 2007-12-18 23:34

Message:
Logged In: YES 
user_id=313747
Originator: NO

I think this one got silently adopted earlier.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1670440&group_id=55736




More information about the Pd-dev mailing list