Ticket UUID: | 378209fe023935a5308af7e6a345ab945bc36202 | |||
Title: | Unknown options error for ProgressDlg and PasswdDlg | |||
Type: | Bug | Version: | main | |
Submitter: | oehhar | Created on: | 2025-02-21 17:29:16 | |
Subsystem: | bwidget 1.x | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Open | Last Modified: | 2025-06-24 18:45:01 | |
Resolution: | None | Closed By: | nobody | |
Closed on: | ||||
Description: |
Reported by private E-Mail: % ProgressDlg .p % .p configure unknown option "-geometry" % PasswdDlg .d % .d configure unknown option "-anchor" Thanks, Harald | |||
User Comments: |
oehhar added on 2025-06-24 18:45:01:
Thank you for the proposal. Here is the test branch for ProgressDlg and PasswdDlg: commit [1119d44d62] in branch [378209fe-map-to-parent-class]. Then, only the options of Dialog are returned by the configure method: % ProgressDlg .p .p % join [lsort [.p configure]] \n -anchor anchor Anchor c e -background background Background SystemButtonFace SystemButtonFace -bg background -bitmap bitmap Bitmap {} {} -cancel cancel cancel -1 -1 -class class Class Dialog ProgressDlg -default default Default -1 -1 -geometry geometry geometry {} {} -homogeneous homogeneous homogeneous 1 1 -image image Image {} image1 -modal modal modal local none -padx padX Pad 10 1 -pady padY Pad 1 1 -parent parent parent {} {} -place place place center center -separator separator separator 0 0 -side side side bottom bottom -spacing spacing spacing 10 10 -state state State normal normal -title title title {} {} -transient transient transient 1 1 The documentation lists the following options:
This is not in-line with the returned options. The returned options are those from the Dialog command. See the default class "Dialog" and the current class "ProgressDlg". Here a bit of archelogy: % parray Widget::_class Widget::_class(.help_shell) = DynamicHelp Widget::_class(.p) = Dialog Widget::_class(.p#ProgressDlg) = ProgressDlg Widget::_class(.p.bbox) = ButtonBox Widget::_class(.p.frame.pb) = ProgressBar By querying ".p", the Dialog class is used. By querying ".p#ProgressDlg", the right class is used, but an error is thrown. About the "SelectColor::use" in pckIndex.tcl, this is moved to new ticket [c847b2c6]. THanks for all, Harald anonymous (claiming to be (TWu)) added on 2025-06-24 08:21:03: Solution is deleting the "#class-name" from the calls of ::Widget::cget and ::Widget::configure, but only outside of "create" command. This is needed for passwddlg.tcl, progressdlg.tcl and font.tcl. Second, for BWidget knows the command "use" for SelectColor, please add in pkgInit.tcl the command "::SelectColor::use" right at the end of the definition list for it. oehhar added on 2025-02-21 17:59:37: To make this work, I have to remove all dialog options from those widgets: From (passwddlg.tcl, Line 16) namespace eval PasswdDlg { Widget::define PasswdDlg passwddlg Dialog LabelEntry Widget::bwinclude PasswdDlg Dialog :cmd \ remove {-image -bitmap -side -default -cancel -separator} \ to namespace eval PasswdDlg { Widget::define PasswdDlg passwddlg Dialog LabelEntry Widget::bwinclude PasswdDlg Dialog :cmd \ remove {-image -bitmap -side -default -cancel -separator\ -anchor -geometry .... } \ This is IMHO not a solution. There is something else not working. Any proposal appreciated, Harald |
