please refer the project.
three screen are there , rootscreen, firstscreen, second screen
Timer is implemented which trigger the key released slot and check any key is pressed ..
Problem is for second iteration keyHandler retains its previous state . Which is the parameter that can clear the state of key
thank you for the example. So far I could see the continuously log messages ''checkkeypressed' and 'lot - onKeyRelease'. This is caused by the method onKeyRelease being invoked in context of Timer. The call stack window reveals the situation:
The method onKeyRelease is invoked in two cases: (1) by the KeyHandler when the user releases the key and (2) by the Timer object as shown in the screenshot above.
The problem with this approach is, the method evaluates the variable Code from the KeyHandler. This variable (similar to other state variables existing the KeyHandler) is valid only while the KeyHandler triggers its associated slot method (e.g. OnPress, OnHold or OnRelease). Evaluating the variable at any other time point will result in the recent code (recent state) processed by KeyHandler.
You will need to adapt your code so that when the method onKeyRelease is executed in context of the Timer, the variable Code is not evaluated:. Following could be the adaptation. The affected modifications are highlighted:
Does the modification work as expected?
concerning your second question:
Meanwhile i want to ask If i have to run continuous process from UI application without based environment .then in which part i need to include . For example for win32 based environment i called it from main() function so in Embedded Wizard which is that function that is called first and can be run.Is it method init()?
I have again difficulties to understand what you mean. Can you please explain what you intend to do?
I suppose, with "continues task" you mean a separate process or thread? If yes, Embedded Wizard itself does not provide such functionality. If you have an OS then you can of course use it to start a separate thread/process. Doing this, however, you should ensure that Embedded Wizard code is executed in context of the main thread only. See also section Avoid multithreading.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!