Page 1 of 1

open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 3:06 pm
by Nubeat7
while trying to do save/load via ruby i recognised that there is an issue with calling a window via win32api.

the issue is that rubymodule shuts down because of excessive processing when no interaction with the opened windows are happening..

here is a schematic which shows the described issue, it includes a filedialog and just a simple messagebox

Re: open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 3:29 pm
by Nubeat7
further testing has shown that after exporting the schematic to exe or vst nothing is happening when trying to save /load or open the message box

Re: open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 5:58 pm
by CoreStylerz
Strange :!:

Re: open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 7:48 pm
by MyCo
It's normal behaviour. The message box blocks the ruby thread from doing its work. So FS thinks this blocking is caused by a bad ruby code, and deactivates that.

For exporting: You have to publish the ruby folder from the FS-Program directory with your executable.

Re: open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 9:30 pm
by Nubeat7
MyCo wrote:It's normal behaviour. The message box blocks the ruby thread from doing its work. So FS thinks this blocking is caused by a bad ruby code, and deactivates that.

For exporting: You have to publish the ruby folder from the FS-Program directory with your executable.
#

oh, thanks for the tip of publishing the ruby folder, now it opens the windows in the exe file but ruby still gets turned off, not only in FS!

the example with the message box is taken from the userguide (i know there is a methode for message box without win32api call) but shouldnt this be working after exporting?

or is there a way to make it work?

it would be also interesting how to use the IFileDialog...

Re: open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 9:36 pm
by MyCo
I don't know of any way to make this work with Ruby. You have to open the windows in another thread, that's the only way to make it work.

Re: open dialogbox with ruby issue/bug!?

PostPosted: Mon Nov 25, 2013 10:38 pm
by Nubeat7
:( too bad, thanks!

Re: open dialogbox with ruby issue/bug!?

PostPosted: Sat Mar 18, 2017 12:07 pm
by francoisreme
Yo can create a new ruby thread, this way it will not block ruby