I had a similar problem. I'm pretty sure it's because any code put within
the -command curly braces {} become part of a different scope, and since,
are no longer defined. You can get around this by any of these methods:
-- put the command in quotes, rather than curly braces
-command "$widget(xscrollX) xview"
-- put the command in a function call (and make the widget array
global)
-- make a list of the command. ie:
-command [list $widget(xcrollX) xview]
Hopefully one of these methods will help you.
Pete
-----Original Message-----
From: Stef Pillaert [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 15, 2000 1:49 AM
To: [EMAIL PROTECTED]
Subject: [vtcl-user] scrolling canvas & aliases
Hello,
I'm new to the list (and to Vtcl, Tcl/Tk), so sorry if this is a silly one:
I have a canvas, and a scrollbar. When I use the "absolute" names (e.g.
.top34.can31 and the like), I can manage to scroll the canvas. However, if I
give both the canvas and the scrollbar an alias, and I use
$widget(whatever_alias) in the scroll commands, vtcl complains about not
knowing the variables and commands. However, when I run in test mode, it
works
(I can scroll the canvas!).
Am I doing something wrong using those aliases? Or is there some kind of
bug?
Thanks,
Stef.
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user