The variable widget is an array containing all aliases you specify for your
widgets. Vtcl automatically declares it as global (just  look at the
beginning of your program). It also contains the real widgetnames for
example .top17.but5 or so.
So when you want to manipulate a widget from inside of a procedure you have
to declare "global widget" to make the contents of the array named widget
available to your procedure.

Gerhard Thanner



> -----Urspr�ngliche Nachricht-----
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Donnerstag, 14. Oktober 1999 02:25
> An:   [EMAIL PROTECTED]
> Betreff:      [vtcl] Using $widget(alias) calls in procs?
> 
> Greetings,
> 
> I am waniting to use the $widget(alias) feature in procs but seem to be
> having a bit of trouble understanding the global / local concept in this
> specific case.
> 
> I have tried:
> 
> global alias
> 
> inside the proc with no success.  Thinking that the alias is a global var.
> 
> Until I can find a better solution I am just passing $widget(alias) to the
> procs, which works fine, but, seems a bit cLuMbsY.
> 
> Thoughts welcome!
> 
> -- RJ Ent. --
> http://www.rjent.pair.com  Had Enough GPF's from M$? 
> Try something stable:  http://www.freebsd.org or http://www.redhat.com
> Strong Supporter of Visual Tcl -- http://www.neuron.com/stewart/vtcl/
> 
> --------------------------------------------------------------------------
> -
> To unsubscribe from the Visual Tcl mailing list, please send a message
> to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
> message body (where [EMAIL PROTECTED] is your e-mail address).
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).

Reply via email to