Multiple views (Ruby)

For general discussion related FlowStone
Post Reply
User avatar
DaveyBoy
Posts: 131
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Multiple views (Ruby)

Post by DaveyBoy »

Hi Guys

The manual (page 156) mentions multiple views but doesn't explain how to use them. In the example below, how would I draw to the bottom view only?

Image

As always any advice much appreciated.

Thanks in advance
Dave
TheOm
Posts: 103
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Multiple views (Ruby)

Post by TheOm »

Use the first parameter of draw to distinguish which view is requesting the draw, for example like this:
Attachments
ruby multi view.fsm
(549 Bytes) Downloaded 1009 times
User avatar
DaveyBoy
Posts: 131
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Re: Multiple views (Ruby)

Post by DaveyBoy »

Yes that works

Thanks TheOm :)
User avatar
DaveyBoy
Posts: 131
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Re: Multiple views (Ruby)

Post by DaveyBoy »

Hmmmm now I have another issue:

Image

The mouseover is still active in the top view... any way to stop this?

Multiple Display Mouseover.fsm
(1.96 KiB) Downloaded 1011 times


Thanks again in advance :)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Multiple views (Ruby)

Post by KG_is_back »

It seems to be a bug. In the mouse-related methods the input ("i") object doesn't work. It always is index 0 by default and empty name (""). While in the draw method it is correctly indexed both by number and by name.
User avatar
DaveyBoy
Posts: 131
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Re: Multiple views (Ruby)

Post by DaveyBoy »

Thanks KG
Seems this has been mentioned before, I was just about to give up when I found this thread:

http://www.dsprobotics.com/support/viewtopic.php?f=2&t=3518&hilit=multiple+view&start=10

So adapting Tronic's "Trigger View" workaround and changing the cursor all is good :D

Image

Multiple Display Mouseover Working.fsm
(2.18 KiB) Downloaded 967 times


It is a bit of a hack but it works!
Hope this will help someone else in the future until the bug is fixed :)

Thanks again KG
Post Reply