Awesome, the client receives the first line from the MUD... then hangs. I've
got to force quit it out, actually. Anyone else have something to say? The
code now looks like this: http://pastie.org/332883

On Sat, Dec 6, 2008 at 4:01 PM, Krzysztof B. Wicher <[EMAIL PROTECTED]>wrote:

> :)
>
> OK I realized that my condition is not that you wanted but if you change it
> to:
> if $killed != true, it should be what you want ....
> ... you also need to be able to break out of the loop which can be achieved
> by:
> changing: "every 1 do" to e.g. : "t=every 1 do" and then adding to IF
> statement : "else t.remove"
>
> Sorry for not being correct at the first place.
>
> K
>
>
> On Sat, Dec 6, 2008 at 10:50 PM, Krzysztof B. Wicher <[EMAIL PROTECTED]>wrote:
>
>> Hi,
>>
>> First of all, your until loop was not correctly conditioned ("untill
>> $killed = true" will run forever :) ... but still even after correcting the
>> condition I could not make it to work for some reason Shoes hung. Try this,
>> it worked for me .. at least third window started to display some data;)
>>
>> require 'socket'
>>
>> Shoes.app do
>>   $server = TCPSocket.new("projectbob.game-host.org", 4000)
>>   $killed = false
>>   window do
>>     flow :width => 600 do
>>       every 1 do
>>       if $killed == true
>>         line = $server.gets
>>         para line
>>       end
>>     end
>>   end
>>   end
>>   window do
>>     flow do
>>       $prompt = edit_line :width => 550
>>       $prompt.text = "Type here!"
>>       ok = button "snd"
>>       ok.click { $server.puts($prompt.text) }
>>     end
>>   end
>>   button "Disconnect" do
>>     $killed = true
>>   end
>> end
>>
>> K
>>
>>
>>
>>
>> On Sat, Dec 6, 2008 at 10:00 PM, Timothy McDowell <[EMAIL PROTECTED]>wrote:
>>
>>> http://pastie.org/332844
>>> The above code should work, no?
>>>
>>> The three windows are open (I know, silly, but I'll explain later), I can
>>> type into the one and click the 'snd' button, but nothing ever shows up on
>>> the window that is supposed to be written on by the MUD. Any thoughts? Also,
>>> that 'window do' bit opens up its own background thread, correct? It
>>> runs separately from the other windows?
>>>
>>> Thanks in advance!
>>> --
>>> --Timothy.
>>>
>>
>>
>


-- 
--Brains.

Reply via email to