Yes, exactly. A few years ago I too started to change the hardwired .top17
to $base but realized that since I use aliases heavily (vTcl's "widgets"
array) it just wasn't going to work anyway. I never have tried to think it
through to come up with ideas on how to handle it. I just let it go when I
realized it wasn't simple. It may be that we'd have to access the %W
substitution variable for bound events, and manually pass this to callback
procs, etc.
Maybe iTcl makes this easier?
On Fri, 30 Mar 2001, Cristian Chaparro wrote:
> Thats right! I had the habit of creating the interface with vtcl and editing
> the code afterwards... although I'm correcting this now with vtcl 1.5.1 :-)
> I manually corrected the source and changed -command {.top...} by -command
> "$base...". Actually in vtcl I declared the command for scrollbars as being
> '$base.text.. yview' and afterwards just changed the {} into "'s. I'm almost
> sure I got an error message stating that $base was an unknown variable, but I
> ignored it and the command was put in the source anyhow. I had no menu's on
> the toplevels so I did not see this.
> Looking into some 1.5.1 code I see this is corrected but still... what
> happens with aliasing in such a case? Do toplevels created like this get an
> automatic alias, and if yes, how do I now what it is? Is it a recommended
> practise to instance copies of toplevels like this or should I avoid it?
>
> Cristian.
>
> Rick Macdonald wrote:
>
> > On Fri, 30 Mar 2001, Cristian Chaparro wrote:
> >
> > > Hi all,
> > > I have some code where I use different instances of one toplevel by
> > > calling
> > > Window show .top17 .top18
> > > Window show .top17
> > > Thus creating a toplevel .top18 based on the same code as .top17.
> > > I created this code with vtcl 1.2...
> >
> > Really? I thought that feature didn't work? Doesn't it generate some
> > hardwired references to ".top17" in the "proc vTclWindow.top17"? For
> > example, in menubuttons and scrollbars? Maybe it was fixed in a later
> > version?
> >
> > menubutton $base.fra34.cpd17.03 \
> > -anchor w -background grey85 \
> > -font -Adobe-Helvetica-Medium-R-Normal-*-*-120-*-*-*-*-*-* \
> > -foreground black -highlightbackground grey85 \
> > -menu .top17.fra34.cpd17.03.04 -padx 4 -pady 3 -text Edit -width 4
> >
> > scrollbar $base.fra38.fra33.cpd18.02 \
> > -background grey85 -borderwidth 1 \
> > -command {.top17.fra38.fra33.cpd18.01 xview} \
> > -highlightbackground grey85 -highlightthickness 0 -orient horiz \
> > -width 10
> >
> > ...RickM...
> >
> > _______________________________________________
> > vtcl-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/vtcl-user
>
>���������������������������������������ǫ����x%��o����ǫ�X������y�+���z�m����X������y�+���z���l�X��)ߣ��r_�
>
...RickM...
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/vtcl-user