On Wed, 27 Aug 2008, Seth Thomas Rasmussen wrote:
> On Wed, Aug 27, 2008 at 3:20 PM, Hugh Sasse <[EMAIL PROTECTED]> wrote:
>
> > Can someone tell me how to trap the return key being pressed in
> > the edit_line? I can't seem to get it with change{} or edit_line{}.
> > I'd like to make it the same as a button press in some apps.
>
> Detect \n as the last character during the change block. I like this
> style right now:
>
> edit_line do |x|
> if x.text.chomp!
> # return'd
Nice. Thank you.
> else
> # normal type fiddling
> end
> end
>
Any chance you have got sensible results out of popen to read and write
to another program? I've got some python code I'd like to run (and maybe
translate to ruby one day, but for now) and I can't get anything useful
out of popen("program", "rw") in shoes. I've done it in ruby before now,
but it stops the GUI dead. I suspect I'll have to use Threads and a Mutex.
Those are never fun to debug.
Hugh