[wxruby-users] New problem: Newlines.

Alex Fenton alex at pressure.to
Fri Jan 9 02:54:57 EST 2009


Tim Mcd wrote:
>   def on_init
>     #Timer.every(25) { Thread.pass }
>   
...
>
>   def main_loop
>     a = Thread.new do
>       until connection.closed? == true
>         input = $connection.recv(1000000)
>         test.append_text input
>       end
>     end
....
> nowai = GuiMudClientApp.new

Don't override main_loop unless you know what you're doing. And if you 
do override it, you must call super() within it. This is the source of 
your error.

Basically, all of your start-up code - including your Thread 
initialisation - should go in the on_init method. This goes for prety 
much any App.

a


More information about the wxruby-users mailing list