Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bad window path name... Why ???

1,735 views
Skip to first unread message

maura.m...@gmail.com

unread,
Jul 26, 2006, 12:40:17 PM7/26/06
to
WIth the goal to shrink the GUI panel we are trying to gather some of
the pre-existing buttons together by functional areas.
The old configuration defined two labels (H and V) with assocaited
radiobuttons as follows:
____________________________________________________________________________

# Rotation radiobuttons
# frame $base.frame_panel.rbut_rot_h
# frame $base.frame_panel.rbut_rot_v

# label $base.frame_panel.rbut_rot_h.label \
# -borderwidth 0 \
# -font 7x13 \
# -text "H"

# label $base.frame_panel.rbut_rot_v.label \
# -borderwidth 0 \
# -font 7x13 \
# -text "V"

# radiobutton $base.frame_panel.rbut_rot_h.angle_0_h \
# -relief raised \
# -variable plot(rot_v) -text "0" -value 0 \
# -font "-adobe-symbol-medium-r-normal-*-14-*-*-*-*-*-*-*"

# radiobutton $base.frame_panel.rbut_rot_h.angle_pi_h \
# -relief raised \
# -variable plot(rot_v) -text "p" -value 1 \
# -font "-adobe-symbol-medium-r-normal-*-14-*-*-*-*-*-*-*"

# radiobutton $base.frame_panel.rbut_rot_v.angle_0_v \
# -relief raised \
# -variable plot(rot_h) -text "0" -value 0 \
# -font "-adobe-symbol-medium-r-normal-*-14-*-*-*-*-*-*-*"

# radiobutton $base.frame_panel.rbut_rot_v.angle_pi_v \
# -relief raised \
# -variable plot(rot_h) -text "p" -value 1 \
# -font "-adobe-symbol-medium-r-normal-*-14-*-*-*-*-*-*-*"
# pack $base.frame_panel.rbut_rot_h.label \
# $base.frame_panel.rbut_rot_h.angle_0_h \
# $base.frame_panel.rbut_rot_h.angle_pi_h \
# -side left -expand yes -fill both
# pack $base.frame_panel.rbut_rot_v.label \
# $base.frame_panel.rbut_rot_v.angle_0_v \
# $base.frame_panel.rbut_rot_v.angle_pi_v \
# -side left -expand yes -fill both
_________________________________________________________________________

I first replace each twin radiobuttons by a tk_optionMenu. It worked
but this widget does not allow me to insert any text or label
qualifying what the menu entries are for. I mean what appeared on the
GUI panel was just the currently selected respective radiobutton
values.
Since the above is supposed to allow the user for rotating the
canvas-displayed graphics either around a vertical or a horizontal
axis, I think the user should somehow know the rotation direction when
selecting the rotation angle ...
To try and solve this problem I created two menubuttons whose child is
respectively the menu returned by tk_optionMenu. Both menubutton are
contained in the same frame that is then placed in the panel grid.
So far I had not been successful at making this work. I fixed some
child-parent path Tcl was complaining about. I fixed the outermost
window name as Tcl does not like capitol letters. Still now it's
returning the following error:

bad window path name ".frame_panel.rbut.rot_h"

I cannot make a sense out of this message. Why is it a bad window
pathname ?
In the following I've pasted my new code.
Thank you in advance for your assistance.
maura
_____________________________________________________________________________
frame $base.frame_panel.rbut

set menu_H [tk_optionMenu $base.frame_panel.rbut.rot_h.om
plot(rot_v) "0" "p" ]
$menu_H configure -borderwidth 1

set menu_V [tk_optionMenu $base.frame_panel.rbut.rot_v.om
plot(rot_h) "0" "p" ]
$menu_V configure -borderwidth 1

menubutton $base.frame_panel.rbut.rot_h -text H -menu menu_H
menubutton $base.frame_panel.rbut.rot_v -text V -menu menu_V

pack $base.frame_panel.rbut -side left -expand yes -fill both
______________________________________________________________________________

Bryan Oakley

unread,
Jul 26, 2006, 12:56:18 PM7/26/06
to
maura.m...@gmail.com wrote:
> ... I fixed the outermost

> window name as Tcl does not like capitol letters. Still now it's
> returning the following error:
>
> bad window path name ".frame_panel.rbut.rot_h"
>
> I cannot make a sense out of this message. Why is it a bad window
> pathname ?
> In the following I've pasted my new code.
> Thank you in advance for your assistance.
> maura
> _____________________________________________________________________________
> frame $base.frame_panel.rbut
>
> set menu_H [tk_optionMenu $base.frame_panel.rbut.rot_h.om
> plot(rot_v) "0" "p" ]

You have created a frame named $base.frame_panel.rbut, and then created
an option menu named $base.frame_panel.rbug.rot_h.om. Nowhere have you
created the widget $base.frame_panel.rbut.rot_h. Hence, the error
message you see complaining about "...rot_h"

--
Bryan Oakley
http://www.tclscripting.com

Gerry Snyder

unread,
Jul 26, 2006, 1:56:57 PM7/26/06
to
maura.m...@gmail.com wrote:
> .... Still now it's

> returning the following error:
>
> bad window path name ".frame_panel.rbut.rot_h"
>
> I cannot make a sense out of this message. Why is it a bad window
> pathname ?
> In the following I've pasted my new code.
> Thank you in advance for your assistance.
> maura
> _____________________________________________________________________________
> frame $base.frame_panel.rbut
>
> set menu_H [tk_optionMenu $base.frame_panel.rbut.rot_h.om
> plot(rot_v) "0" "p" ]
> $menu_H configure -borderwidth 1
>
> set menu_V [tk_optionMenu $base.frame_panel.rbut.rot_v.om
> plot(rot_h) "0" "p" ]
> $menu_V configure -borderwidth 1
>
> menubutton $base.frame_panel.rbut.rot_h -text H -menu menu_H
> menubutton $base.frame_panel.rbut.rot_v -text V -menu menu_V
>
> pack $base.frame_panel.rbut -side left -expand yes -fill both
> ______________________________________________________________________________
>

The window path is not defined at the time the [set menu_H] command is
executed. Try putting the [menubutton] commands before the [set munu]
commands.

HTH,

Gerry

0 new messages