Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:41 19 May 2024 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 : Interesting GUI issue....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 01:01am 24 Feb 2017
Copy link to clipboard 
Print this post

Hi folks.

While working on my GUI program tonight, I was wanting to make use of the TIMER command and function, to keep track of how long the program is in any one menu, and if the user has not entered valid data and gone through the correct motions within a certain time, the code auto-terminates that menu, and goes back to the main menu.

All this is working just fine UNTIL you try that idea out with a textbox active on the LCD waiting for you to type things in.

The CtrlVal references change from number to text, for checkboxes in the background, while the textbox is on the screen, which throws an error when the code then tries to check the condition of the checkboxes when an auto-exit timeout has been forced:




At the point in the GIF above where I query what PRINT_LOG is(152), I have CLOSED the text-box on the screen. At that point in time, querying the checkbox results in the correct data - that being a one or a zero, but while the textbox is on the LCD, CtrlVal(PRINT_LOG)="Print messages", which causes the "Expected a number" error when the code tries to go back to the main menu.

SO, what I need to know, is how can you FORCE a textbox to close?
IE: At a certain point in time, if the texbox is still on the LCD and active, but the timeout has occurred, I need to force a close of this control WITHOUT waiting on the user to touch ENT on the virtual keyboard.

This will return all the background GUI control values to where they need to be, so that when the main menu queries if any settings have been changed, I won't get that error anymore.

I could just use an ON ERROR SKIP command, but it would be nice to have a cleaner way of dealing with this problem - if possible.
Edited by Grogster 2017-02-25
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 02:49am 25 Feb 2017
Copy link to clipboard 
Print this post

...bump.

No-one has any ideas on this one?
Smoke makes things work. When the smoke gets out, it stops!
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 08:57am 25 Feb 2017
Copy link to clipboard 
Print this post

Maybe it has something to do with the MM.KEYPRESS thing... I didn't hear any responses come back on that either...
 
Print this page


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

© JAQ Software 2024