[fxruby-users] FXTextField

Joel VanderWerf vjoel at path.berkeley.edu
Thu Jan 26 16:13:35 EST 2006


Uwe Hartl wrote:
> Hi Lyle,
> 
> I got it. It took me forever:
> 
>                 @txt.connect(SEL_LEFTBUTTONPRESS) {|sender, sel, item|
>                         helpText.setText("Suche nach einem Datum.")
>                         @txt.onLeftBtnPress(sender, sel, item)
> 		0
>                 }
> 
> The "0" does the trick. The event is not consumed and the Textfield still 
> reacts to the mouse. The funny thing is, I get an error message, when I write 
> return 0

That's because ruby thinks you are returning from the enclosing method, 
rather than from the block. You can use "break 0" to exit from the block 
with a certain value.

> I got the idea from here:
> 
> http://www.fox-toolkit.com/messages.html
> in the section "Message Handler Return Values"
>  
> Thanks for the help
> 
> Uwe
> 


-- 
        vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


More information about the fxruby-users mailing list