Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Has there been changes to Slider Widget?
#1
Has there been any changes to the slider widget post 5.0?  I hve noticed for some time that the sliders that I use to dim my lights do not seem to work anymore.  I have now looked into the problem and found that the fields in my PDL lighting driver, which are Card4 and have a Range[0..9] not longer show up when I try to set a field.

Field=LIGHT_Dim_21
        Type=Card4; Access=ReadWrite; Limits="Range:0,9";   
   EndField;

I have another PDL driver with Limits ="Range:0,63" and that shows up in the field selection dialogue.  Is there now some lower limit on what is a range for a slider.

PJG
Reply
#2
Yeh, someone else saw this just the other day. There were a bunch of these types of widgets and each had their own ad hoc min/max values. In 5.x those values were consolidated but the minimum ended up at 16 somehow. I've changed it to 8 now in the code, but that won't actually show up until the first beta drop.

How hard would it be in the meantime to make the range actually 18 and divide by two for incoming writes and multiply by two for the values read from the device?

If that would be a huge problem I could do an off to the side build for you two guys who have this issue.
Dean Roddey
Software Geek Extraordinaire
Reply
#3
(03-09-2018, 08:10 AM)Dean Roddey Wrote: Yeh, someone else saw this just the other day. There were a bunch of these types of widgets and each had their own ad hoc min/max values. In 5.x those values were consolidated but the minimum ended up at 16 somehow. I've changed it to 8 now in the code, but that won't actually show up until the first beta drop.

How hard would it be in the meantime to make the range actually 18 and divide by two for incoming writes and multiply by two for the values read from the device?

If that would be a huge problem I could do an off to the side build for you two guys who have this issue.

I'm the other guy referred to.  If you're going to do the divide by two thing I'll just mention a couple things that snagged me and took some extra thinking.

1. Do the divide by 2 then do your logic etc.  The issue is that if you're displaying text of the volume and setting the slider to a range it will only display as 0-10 when you divide by two.  That means the slider will only display for the first half of the widget (remember your range is actually 1-20 or whatever, but you divided by 2 so it's working on 0-10 now).   What I did was after my logic was done was to multiply back by 2 so the widget works/displays right (assuming you set a new range of 0-20 for example.  Hope that makes sense.

2. If you update a GVar's to have a new range. Once global variables are created it's tough to re-create them in logic.  I found the reload/clear globals in the IV didn't reset the GVAR's so had to cycle CQC then my new create GVAR commands got set to the new range.  It's like when you forget to disable template cashing, make a bunch of changes and wonder why they didn't work.

I'm now OK to wait for the next drop in due time by the way Dean.
Reply
#4
Reload/Clear GLobals should definitely reset all of the global variables (in that IV instance only of course.) Restarting the IV would also do that.

You sure you didn't have them being created somewhere else?
Dean Roddey
Software Geek Extraordinaire
Reply
#5
(03-09-2018, 03:23 PM)Dean Roddey Wrote: Reload/Clear GLobals should definitely reset all of the global variables (in that IV instance only of course.) Restarting the IV would also do that.

You sure you didn't have them being created somewhere else?

Hmm, I don't think so.  I had a lot of issues with inconsistent results setting the new limits on the variables and chocked it up to Clear globals not touching the variables. I also had the IV cache templates on so maybe it was a combo of that and some mistakes on my part, I'm not sure.  The reboot fixed whatever else was going on tricking me to think that clear globals didn't actually reset the GVar's I guess.  Thanks for clarifying that it should.
Reply
#6
Reboot of what? The variables inside the IV are purely inside that IV window, so restarting the IV, absolute worst case would clear them for that IV window.

Now, if you are using WebRIVA, that's not a separate IV window, it's a virtual one on the server. But each WebRIVA client has his own set of globals. And I think the popup menu has an option to clear global variables, right? In that case also though, shutting down the browser and start it back up again would disconnect the WebRIVA client from the server, and the next time it starts it will get a fresh IV engine with no globals.
Dean Roddey
Software Geek Extraordinaire
Reply
#7
(03-09-2018, 07:08 PM)Dean Roddey Wrote: Reboot of what? The variables inside the IV are purely inside that IV window, so restarting the IV, absolute worst case would clear them for that IV window.

Now, if you are using WebRIVA, that's not a separate IV window, it's a virtual one on the server. But each WebRIVA client has his own set of globals. And I think the popup menu has an option to clear global variables, right? In that case also though, shutting down the browser and start it back up again would disconnect the WebRIVA client from the server, and the next time it starts it will get a fresh IV engine with no globals.

No webRiva here at the moment.  I recall rebooting windows on the main server/IV and standalone IV and then it worked as expected.  I think maybe I don't have the best understanding of GVar's.  Are you saying that one IV would have a different set of GVar's from another IV (on a different pc?) or are they consistent across all IV's (not incl. Riva)  I was testing between two separate IV's back and forth so maybe that was it.
Reply
#8
Every IV has its own. Otherwise, it would be a mess, since if you had two of them running the same interface they would step on each other. If you cleared globals on one IV and that deleted them all, it would delete them behind the back of any other IVs currently running, which would be sort of disasterous.

Global variables are local to the program really. So for the IV they are local to that IV. For the event server they are local to the event server. For a trigger driver, that driver has its own. Otherwise, it would be impossible to use them since you couldn't keep one thing from potentially using the same variable name as something else.

Fields are the only thing that are global to the whole system. The variables driver lets you create basically generic fields that act as truly global variables.
Dean Roddey
Software Geek Extraordinaire
Reply
#9
OK, thanks for that.  I just recently started using more than one IV so hadn't run into that before.  It was definitely my lack of understanding that caused the odd behaviours.
Reply
#10
I'll wait for another drop with a fix.  It's not worth all the messing about with the driver.

PJG
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Interface Template editor widget view gone? rbroders 3 342 02-03-2018, 07:22 PM
Last Post: rbroders
  Field Boolean Text Widget issue greymatter 5 1,368 08-26-2017, 04:45 PM
Last Post: greymatter
  Widget Locator zra 6 1,520 08-09-2017, 06:06 PM
Last Post: Dean Roddey
  Camera Widget dogman 1 674 07-08-2017, 04:54 PM
Last Post: Dean Roddey
  Graph Widget - There is no editor for data type float zra 4 1,154 07-06-2017, 02:25 PM
Last Post: Dean Roddey
  SOLVED -- Web widget / Spotify agarden 4 1,560 05-27-2017, 05:38 PM
Last Post: agarden
  5.1 Web widget Mark Stega 9 2,225 05-21-2017, 03:19 PM
Last Post: Dean Roddey
  Web browser widget background color dlmorgan999 3 1,089 04-27-2017, 05:01 PM
Last Post: Dean Roddey
  Slider for IR tom 2 777 03-06-2017, 02:17 PM
Last Post: tom
  volume Knob widget issue dogman 7 1,650 03-02-2017, 10:55 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)