Page 1 of 1

Multiple views (Ruby)

PostPosted: Mon Apr 03, 2017 11:22 am
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

Re: Multiple views (Ruby)

PostPosted: Mon Apr 03, 2017 5:43 pm
by TheOm
Use the first parameter of draw to distinguish which view is requesting the draw, for example like this:

Re: Multiple views (Ruby)

PostPosted: Mon Apr 03, 2017 7:34 pm
by DaveyBoy
Yes that works

Thanks TheOm :)

Re: Multiple views (Ruby)

PostPosted: Mon Apr 03, 2017 10:23 pm
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 943 times


Thanks again in advance :)

Re: Multiple views (Ruby)

PostPosted: Tue Apr 04, 2017 12:26 am
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.

Re: Multiple views (Ruby)

PostPosted: Tue Apr 04, 2017 11:20 am
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 894 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