Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:09 06 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Saving Object values...

Author Message
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 05:24pm 12 Oct 2016
Copy link to clipboard 
Print this post

I have a GUI spun up that uses number boxes and I tried to store there values in the Flash memory area...

I keep getting this error...



Not sure why... Do I need to read the control values to some other variable then store the other variable..?

 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 07:02pm 12 Oct 2016
Copy link to clipboard 
Print this post

CTRLVAL is a function/command so I expect that you do have to use a true variable for saving.
You can use an array.

JimEdited by TassyJim 2016-10-14
VK7JH
MMedit
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 11:44pm 12 Oct 2016
Copy link to clipboard 
Print this post

Yep... thanks Jim...
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 03:27pm 14 Oct 2016
Copy link to clipboard 
Print this post

Hi Jim;
  TassyJim said   CTRLVAL is a function/command so I expect that you do have to use a true variable for saving.
You can use an array.

Jim
I don't understand this?
I can't find CTRLVAL in the manual?
Would you explain further please?
Thanks!
redrok
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 04:28pm 14 Oct 2016
Copy link to clipboard 
Print this post

Micromite Plus addendum page 27
Advanced graphics
Interacting with Controls

  Quote  Interacting with Controls
Using the following commands and functions the characteristics of the on screen controls can be changed and their value retrieved.

= CTRLVAL(#ref)
This is a function that will return the current value of a control. For controls like check boxes or switches it
will be the number one (true) indicating that the control has been selected by the user or zero (false) if not.
For controls that hold a number (eg, a SPINBOX) the value will be the number (normally a floating point
number). For controls that hold a string (eg, TEXTBOX) the value will be a string. For example:
PRINT "The number in the spin box is: " CTRLVAL(#10)

CTRLVAL(#ref) =
This command will set the value of a control. For off/on controls like check boxes it will override any
touch input and can be used to depress/release switches, tick/untick check boxes, etc. A value of zero is off
or unchecked and non zero will turn the control on. For a LED it will cause the LED to be illuminated or
turned off. It can also be used to set the initial value of spin boxes, text boxes, etc. For example:
CTRLVAL(#10) = 12.4


Jim
VK7JH
MMedit
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:36am 15 Oct 2016
Copy link to clipboard 
Print this post

Redrock, as Jim said above, it's in the separate Addendum here . You may have missed that because it's in the main Micromite section of Geoff's site, not the Micromite Plus section.

Greg
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025