[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

TK custom events.

PWR

1/12/2006 1:11:00 PM

Hi, does anyone know how to set up a custom event which the Tk main
loop will pick up i.e. I want to be able to create an event/handler
which allows me to dispatch my own events to the Tk main loop. Any help
gratfully received.

Peter.

5 Answers

Hidetoshi NAGAI

1/12/2006 1:59:00 PM

0

PWR

1/12/2006 2:40:00 PM

0

I'm wanting to do the following,
(1) Monitor an incoming socket with another thread and queue received
messages.
(2) Supply an event to the Tk mainloop when data arrives which causes
it to call a handler which reads the queued data.

The idea is to avoid a solution which involves directly calling Tk
methods from the other thread in case there are any thread safety
issues. I may be being over cautious.

Peter.

RubyTalk@gmail.com

1/12/2006 4:40:00 PM

0

What if i wanted to get the location of a file that i click and drag over
lets say a TkButton?

Becker

On 1/12/06, PWR <pw_richards@fastmail.fm> wrote:
>
> I'm wanting to do the following,
> (1) Monitor an incoming socket with another thread and queue received
> messages.
> (2) Supply an event to the Tk mainloop when data arrives which causes
> it to call a handler which reads the queued data.
>
> The idea is to avoid a solution which involves directly calling Tk
> methods from the other thread in case there are any thread safety
> issues. I may be being over cautious.
>
> Peter.
>
>
>

Hidetoshi NAGAI

1/12/2006 5:06:00 PM

0

PWR

1/12/2006 5:27:00 PM

0

Problem solved, in fact it never existed! Thanks a lot.

Peter.