Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable Limits Syntax
#1
Can anyone point me to a link in the documentation that shows the syntax to use for setting variable limits?  i.e. SafeCreatevariable(varname,type,limits,initval).

What are the options for limits and the syntax? I found the syntax the other day somehow on the forum or maybe the documents but now can't find it for the life of me.. I would expect it or a reference to it somewhere in here perhaps? http://www.charmedquark.com/Web2/CQCDocs/CQCDocs.html?topic=/Reference/Actions&page=/Variables

I need to create a Gvar with a limit of 1-10 is all and can't figure it out.

Thanks
Reply
#2
They are the same type of limits that fields use. I should put a link to that there. I'll add that to doc updates to make.

http://www.charmedquark.com/Web2/CQCDocs...ge=/Fields
Dean Roddey
Explorans limites defectum
Reply
#3
Thanks Dean! That's exactly what I had found the other day, a link would be good.
Reply
#4
OK, I need another steer related to this or maybe it's more of a question about some limits of the slider widget enforced now.

I have some sliders I use for settings of 1-10 via an external command.  They are variable based sliders.  Somewhere along the upgrade path or maybe some tweaking I did they stopped working.  I get the error message:"The value written to variable assignment exceeds the set variable limits"  I've ignored this for over a year and am just getting around to fixing...

I think somewhere you simply started enforcing something around variable limits that wasn't there in past is my guess... but who knows.  Maybe I borked something myself.

To fix:

I now create a GVar with a specified limit of Range 0,10.  I figured that would fix this because in past the range wasn't set at all (blank).  

Here's the rub and where I have been stuck for a couple days... I just figured out that if I set a range of anything with an upper limit of less than 15 I get the error from the slider widget.  If I were to use 0,15 it all works (except that I don't have a case statement for the upper range... I set up for 0-10.) 

Is it simply that you can't have a range lower than 15 for a variable slider now?  If that's the case I think a lower limit of 10 would be better.... not just because I'm lazy and don't want to change my templates :-)   Thoughts/ explanation?  Am I right on this range limit now or could I be doing something else wrong? Maybe it never worked quite right as far as setting values, but I know the error was never there.
Reply
#5
It looks like it's 16. I think what happened was that I consolidated a number of ad hoc limits into one set that is applied to all so that they could be changed for everyone at once if needed, and presumably I missed that one of them was less than 16. That probably happened in the 5.x work. I could lower it to 10. I was just keeping it even binary values.

In the meantime set it to 20 and divide by 2 maybe?
Dean Roddey
Explorans limites defectum
Reply
#6
(03-03-2018, 03:49 PM)Dean Roddey Wrote: It looks like it's 16. I think what happened was that I consolidated a number of ad hoc limits into one set that is applied to all so that they could be changed for everyone at once if needed, and presumably I missed that one of them was less than 16. That probably happened in the 5.x work. I could lower it to 10. I was just keeping it even binary values.

In the meantime set it to 20 and divide by 2 maybe?

OK, certainly not an emergency or anything.  Might be good to also add to the docs or will you change back in software at some point in a future drop?

Yeah good idea I can maybe do a div. by 2 or something although I've used this quite a lot so might be more pain than just waiting for a new drop whenever that may be.  I'll handle it one way or another, not a problem.  Thanks for the prompt response as usual!
Reply
#7
I'm lower it back down to 10. I already have actually. So whenever the next drop comes out, it will be there. The next drop though will be the first real beta, not just another 5.2.x followup.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable Action "Find" command or alternate Shaky 3 455 11-02-2021, 08:19 PM
Last Post: Shaky
  Dynamically Build Call to Variable? gReatAutomation 8 2,088 05-08-2020, 01:22 PM
Last Post: gReatAutomation
  Action wait and exit if variable changes simplextech 8 2,849 02-01-2020, 12:35 PM
Last Post: simplextech
  Time formatting RunTime Time Variable? gReatAutomation 5 2,096 08-14-2019, 05:23 AM
Last Post: gReatAutomation
  GVar... Variable GVar... Already Exists gReatAutomation 3 1,417 08-13-2019, 01:15 PM
Last Post: Dean Roddey
  Creating a Variable Double_J 13 4,558 06-22-2019, 03:40 AM
Last Post: gReatAutomation
  Variable Error in Scheduled Task znelbok 3 1,831 03-22-2019, 09:30 AM
Last Post: Dean Roddey
  Question on Formatting of Variable Text kblagron 2 2,773 09-07-2018, 08:52 PM
Last Post: kblagron
  How would I manually collect digits to enter into a variable ghurty 1 1,492 05-24-2018, 08:51 PM
Last Post: Dean Roddey
  Embedded Variable in Text zra 2 2,442 05-07-2018, 09:59 AM
Last Post: zra

Forum Jump:


Users browsing this thread: 1 Guest(s)