From: "J.Hawkesworth" Date: 2002-07-17T00:08:16+09:00 Subject: RE: TkText no -textvariable workaround? 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 messages etc. cheers, Jon -----Original Message----- From: Peter Hickman [mailto:peter@semantico.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 ruby >instance variable, as i can with all the other widgets. i did figure out >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 i >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 for >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 @text.value @text.delete(1.0,'end') 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: http://www.star.net.uk ________________________________________________________________________ _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp _____________________________________________________________________ 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.