open dialogbox with ruby issue/bug!?

For general discussion related FlowStone
Post Reply
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

open dialogbox with ruby issue/bug!?

Post 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
Attachments
save_load_ruby_issue.fsm
(2.05 KiB) Downloaded 1108 times
Last edited by Nubeat7 on Tue Nov 26, 2013 11:20 am, edited 1 time in total.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: open dialogbox with ruby issue/bug!?

Post 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
User avatar
CoreStylerz
Posts: 327
Joined: Sun Jan 22, 2012 2:19 am
Location: italy
Contact:

Re: open dialogbox with ruby issue/bug!?

Post by CoreStylerz »

Strange :!:
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: open dialogbox with ruby issue/bug!?

Post 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.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: open dialogbox with ruby issue/bug!?

Post 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...
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: open dialogbox with ruby issue/bug!?

Post 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.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: open dialogbox with ruby issue/bug!?

Post by Nubeat7 »

:( too bad, thanks!
francoisreme
Posts: 29
Joined: Wed Feb 15, 2017 4:01 pm

Re: open dialogbox with ruby issue/bug!?

Post by francoisreme »

Yo can create a new ruby thread, this way it will not block ruby
Post Reply