# Hang on leopard

**URL:** <https://www.ruby-forum.com/t/hang-on-leopard/129429>\
**Category:** wxRuby\
**Created:** [February 18, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/hang-on-leopard/129429 "2008-02-18T15:37:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhang\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@Zhang\_P](https://www.ruby-forum.com/u/Zhang_P)\
**Post date:** [February 18, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/hang-on-leopard/129429/1 "2008-02-18T15:37:12Z")

</div>

Hello …

I’m a newbie to ruby and wxruby.

I’m trying to  
create 1 frame (the app) that creates 2 dialog boxes. Each dialog box  
has wxtextctrl, and 1 dialog class has 1 thread and the other has 2  
threads.

At first, I suspect the problem is with the thread  
interaction between ruby and wxwidget. I spent countless hours to try  
to figure out why the hang. Yes, I know the trick to use the Timer  
class to work …

Just out of curiosity, I tried to run the same  
code with no changes on Windows XP running under Parallels on my  
Leopard, and to my surprise, it works like a champ …

Any advise on what I might be doing wrong?

Thanks in advance!

```
  ____________________________________________________________________________________

```

Be a better friend, newshound, and  
know-it-all with Yahoo! Mobile. Try it now.  
[http://mobile.yahoo.com/;\_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ](http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ)

---

<div class="post-metadata">

**Author:** ![Zhang\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@Zhang\_P](https://www.ruby-forum.com/u/Zhang_P)\
**Post date:** [February 18, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/hang-on-leopard/129429/2 "2008-02-18T15:43:17Z")

</div>

Hi

Zhang P. wrote:

> I’m a newbie to ruby and wxruby.  
> Welcome
> 
> I’m trying to create 1 frame (the app) that creates 2 dialog boxes.  
> Each dialog box has wxtextctrl, and 1 dialog class has 1 thread and  
> the other has 2 threads.  
> Why are you using separate threads - what sort of work is being done in  
> the subordinate threads? Is it the GUI that is hanging, or the non-GUI  
> tasks?

I would definitely not advise running wxRuby GUI code outside the main  
GUI thread.

> Just out of curiosity, I tried to run the same code with no changes on  
> Windows XP running under Parallels on my Leopard, and to my surprise,  
> it works like a champ …
> 
> Any advise on what I might be doing wrong?  
> Hard to say anything further without seeing a short working example.

cheers  
alex
