08-27-2024 09:04 AM - edited 08-27-2024 09:08 AM
Hello,
I have built the UIR and there are many panels.
Few have "0" base 1st input argument in LoadPanel () while others are "child" panels to them, e.g. panel_handle name for 1st input argument to LoadPanel ().
I've build and ran many revisions of this SW successfully.
No panel disappears or SW exits unless I hide the panel or exit and close the program, using the buttons on the panel I made.
PROBLEM: Please see attached screenshot of the situation:
Since yesterday, I have been debugging a problem whereby after I selecting the item on a ring-control with 3 selections (no call back for this) and then click OK button (this has call back function), the program goes inside the CB's commit-switch-case, then flows through the operation which includes another switch-case, executes settings and at the end of this internal switch-case, I do a MessagePopup() to prove that all went well as far as the correct item was selected on the pull-down ring-control of this small panel.
I don't hide the "background" panel. I don't exit the program. at the end of CB function, before the commit-break; statement, I only hide the foreground, select power supply panel.
Does anyone know how I can fix this problem?
Thank you for your help.
08-27-2024 10:29 AM
P.S.
In addition to my 1st post, this is what I observed with inserting a MessagePopup () before and after the splash screen panel, it stays displayed and the program does not exit.
How could these code lines fix the problem? but without the before and after Popups(), the panel disappears and program exits?
E.g.
HidePanel (g_panel_psmodel); <----- this is all I should do before the OK-commit-break; but even adding the following lines, without the before and after MessagePopup() the splash panel disappears and SW exits.
SetCtrlVal(g_panel_splash, A_AASPLASH_TXT_SWVERSION, versionstr);
SetCtrlVal(g_panel_splash, A_AASPLASH_TXT_SWVERSION_CTL, versionstrCtrl);
MessagePopup("","BEFORE display g_panel_splash");
DisplayPanel (g_panel_splash);
MessagePopup("","AFTER display g_panel_splash");
break;
Please help.
08-27-2024 03:04 PM
P.P.S.
I fixed the problem.
It had nothing to do with the panels.
It had something to do with the sprintf() I used to format the string for MessagePopup () to show values.
Regardless when I increased the char array size, it didn't matter, there was weird cycling through the same Popup. I've used sprintf and MessagePopup() for tracing my code in many places, including inside callback functions. This is the first time inside this new panel with ring-control and OK button that this happened.
I completely got rid of sprintf () call and just settled with MessagePopup () for each case and now it works.