I think what Tom is after is a neat way to have the widget’s display
automatically whenever the value of some variable is changed. I’ve a
vague recollection of hitting this problem sometime ago (using Tk with
perl) but I think I just bodged my way round the problem by using a
different widget. Or I may have written a lot of code that sent delete
From: Peter Hickman [mailto:email@example.com]
Sent: 16 July 2002 15:29
To: ruby-talk ML
Subject: Re: TkText no -textvariable workaround?
Tom Sawyer wrote:
well, i’ve been busy adding tk support to my gui template tool (Miter),
but i’ve sadly come across a limitation with the TkText widget. it
dosen’t support -textvariable, hence there’s no way to bind it to a
instance variable, as i can with all the other widgets. i did figure
a way of automatically set the instance varaible when the TkText value
changes using bind. but i can not find a way to do the reverse. how do
get the TkText’s value to automatically change when the instance
variable does? i looked to see if there’s was a ruby callback method
such, but i didn’t find one. anyone?
With TkText you go…
@text = TkText.new(… blah blah blah …)
and then later on you can go
and all that jazz.
is that what you wanted?
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
Any views or personal opinions expressed within this email may not be those of Talis Information Ltd.
The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.