32 views
in Embedded Wizard Studio by
Hallo,

i have a vertical list with 4 items, and i want to switch the selecteditem property from my generated slot method. I have a menu item class too, which makes a border arround the item to highlight it ( which works).

I simply just want to increment the selectedItem property with the slot method (which i generated to call from outside). When i press a button on my screen (not touch button) the slot method is called and should seelct the next item.

In my Opion it should just work with: Verticallist.SelectedItem++, but then i get a memory error which want to access to to a space which not exist. In other words i cant change the property SelectedItem from outside.

i tried sth with UpdateViewState but it dont works.

Do anyone have an idea ?

1 Answer

0 votes
by

Hello Pablo,

the operation Verticallist.SelectedItem++ is the correct approach to adapt the selection within the vertical list. Triggering the operation from the 'outside' of the GUI application should also work. In your question, however, you mention a memory error. I assume, you get a CPU exception.

Question 1: Is your application using multiple threads?

Question 2: Is the code containing  Verticallist.SelectedItem++ called from an external thread?

Please note: the entire GUI related code may be called only in context of the GUI thread. No other thread may call the Embedded Wizard functionality. See also: Take care in multi-threading environments.

Question 3: How does the 'outside' code call the Embedded Wizard code?

Question 4: Do you have a debugger in the target system? If yes, can you provide more details concerning the location where the exception occured?

Best regards

Paul Banach

by
Hello,

Q1 + Q2: Its just one thread.

Q3: FIrst i call the Embeeded Wizard method to show my list on the screen, and it works correctly. Then i press a button and the method to switch the selected item is call. The error dont come at the method call, it comes later when processSignals is called.

Q4: Yes i do. Location description: CoreLineView_MoveView()

Thank you for your help
by
Hello Pablo,

can you show the corresponding C code where you invoke Embedded Wizard code?

Best regards

Paul Banach
by
Hello,

thank you for your help,

we find the problem..

we used the wrong context parameter.. Now it works!

 

Wish you a nice week
by
Hello Pablo,

thank you for the good news.

Best regards

Paul

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!

Embedded Wizard Website | Privacy Policy | Imprint

...