[fxruby-users] messages

Lyle Johnson lyle at lylejohnson.name
Thu Oct 23 10:16:12 EDT 2008

On Oct 23, 2008, at 8:58 AM, angico wrote:

> Ok. I have solved the segmentation fault issue. Now the call to
> handle(...) causes the dialog box to close, but it still stays alive
> with its modal behavior. The only way I can get out of it is by typing
> Ctrl-C in the console. Then I got a message telling me:
> ./dialogx.rb:54:in `execute': Interrupt
> 	from ./dialogx.rb:54:in `execute'
> ...
> Why can't I get out of the modal loop via handle(...)? Isn't there a  
> way
> to tell the dialog button to "simulate" a click on it, like we do it  
> in
> Java, with doClick()? Is there any other way I can get out of the  
> modal
> loop of execute()?

I don't know why sending the ID_ACCEPT or ID_CANCEL message wouldn't  
cancel the modal behavior, but I suppose you can just do what those  
handlers would do directly. Instead of calling handle() on the dialog  
box, do something like:

	getApp().stopModal(dialogBox, true)

Hope this helps,


More information about the fxruby-users mailing list