# Re: Feedback messages to user using Tk

**URL:** <https://www.ruby-forum.com/t/re-feedback-messages-to-user-using-tk/70216>\
**Category:** Ruby\
**Created:** [September 27, 2006, 3:32pm UTC](https://www.ruby-forum.com/t/re-feedback-messages-to-user-using-tk/70216 "2006-09-27T15:32:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CameronS\_Gemma\_SUK](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/45deac/32.png) [@CameronS\_Gemma\_SUK](https://www.ruby-forum.com/u/CameronS_Gemma_SUK)\
**Post date:** [September 27, 2006, 3:32pm UTC](https://www.ruby-forum.com/t/re-feedback-messages-to-user-using-tk/70216/1 "2006-09-27T15:32:56Z")

</div>

Thanks a lot Morton, I’ll have a look at this widget when I get home ( :

I had tried something similar to what you suggested with a method, but  
there was no way of triggering it - i think i needed to perhaps run it  
as a seperate process…

Thanks again

Gem

---

<div class="post-metadata">

**Author:** ![CameronS\_Gemma\_SUK](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/45deac/32.png) [@CameronS\_Gemma\_SUK](https://www.ruby-forum.com/u/CameronS_Gemma_SUK)\
**Post date:** [September 27, 2006, 4:23pm UTC](https://www.ruby-forum.com/t/re-feedback-messages-to-user-using-tk/70216/2 "2006-09-27T16:23:04Z")

</div>

On Sep 27, 2006, at 9:28 AM, Cameron, Gemma (UK) wrote:

> Thanks a lot Morton, I’ll have a look at this widget when I get  
> home ( :
> 
> I had tried something similar to what you suggested with a method,  
> but there was no way of triggering it - i think i needed to perhaps  
> run it as a seperate process…

I hope not. That will complicate things quite a bit. Before you do  
that I would suggest trying the following:

1. Expose the label by supplying and attribute reader for it in the  
window class OR provide a public method in the window to update the  
label (like btn\_action but accepting a string argument).
2. Provide your file zipper class with code that either directly  
updates the label or calls the update method in the window class.
3. Don’t call Tk.mainloop in your window class.
4. Create the window object.
5. Create the file zipper object, passing the window object in ‘new’.
6. Now call Tk.mainloop

Regards, Morton
