Tk Library Source Code

View Ticket
Login
Ticket UUID: 1518803
Title: BWidget::write fails for NoteBook widget
Type: Bug Version: None
Submitter: glennjnn Created on: 2006-07-07 15:00:55
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2007-01-09 02:01:24
Resolution: Fixed Closed By: dev_null42a
    Closed on: 2006-12-21 00:01:11
Description:
The error message: 
  invalid command name "-classonly::use"

The NoteBook widget uses (eventually) DynamicHelp.
DynamicHelp uses "-classonly", as defined in
$BWidget::use(DynamicHelp)

The proc BWidget::classes (utils.tcl, line 563) will
invoke "-classonly::use" for DynamicHelp.

The following context diff will fix it:

$ diff -c utils.tcl.orig utils.tcl
*** utils.tcl.orig      Mon Apr 17 12:19:03 2006
--- utils.tcl   Fri Jul  7 10:55:27 2006
***************
*** 567,573 ****
      set classes [list $class]
      if {![info exists use($class)]} { return }
      foreach class $use($class) {
!       eval lappend classes [classes $class]
      }
      return [lsort -unique $classes]
  }
--- 567,575 ----
      set classes [list $class]
      if {![info exists use($class)]} { return }
      foreach class $use($class) {
!         if {![string equal $class "-classonly"]} {
!             eval lappend classes [classes $class]
!         }
      }
      return [lsort -unique $classes]
  }
User Comments: dev_null42a added on 2006-12-21 07:01:11:
Logged In: YES 
user_id=1381097
Originator: NO

Patch applied.  Thanks.

glennjnn added on 2006-11-16 03:45:05:
Logged In: YES 
user_id=152318
Originator: YES

Here you go:

package require Tk
package require BWidget

proc do_write {} { BWidget::write [file join $::env(HOME) bwidget.out] }

Button .b1 -text "launch BWidget::write" -command do_write
Button .b2 -text Exit -command exit
pack .b1 .b2 -side top

nobody added on 2006-09-27 07:36:58:
Logged In: NO 

Do you have a sample script that illustrates this error?

glennjnn added on 2006-07-07 22:07:09:

File Added - 184182: bwidget.diff.txt

Logged In: YES 
user_id=152318

that diff has lost its indent.  Let me attach a file...

Attachments: