Hi Michal,check https://doc.embedded-wizard.de/vertical-list for "Force the list to reload items", which will lead you to InvalidateItems().For your second issue, use the constructor init() to load your list right after initializing the class (with default values).For example: Create a slot "initList" (that should load the list) and fire this slot in the init() via "postsignal initList".Hope this helps,Chris
I attached you the screenshots and code.
I tried to send again the link. I hope it's good now.
So, as far as I understand, you need a connection between "editing" and "refreshing". When you click on "edit" or "save" (afterwards), this should trigger the Refresh-slot, which reloads the list.
I would recommend...- to add an "OnSave"-slot-Property (setter and getter can be deleted) to your EditChannel-Popup. - In your EditChannel-Popup you also need to create an save-slot that fires postsignal OnSave;- Now add another "OnSave"-slot-Property (setter and getter can be deleted) to your ChannelsTableItem.- When you click in your ChannelsTableItem on the edit button, I assume a slot will be fired, which opens a edit-popup. In this edit-slot connect the OnSave to the popup's OnSave. For example: popup.OnSave = OnSave.- At last, go to Screens::Channel.OnLoadItem and add a itemView.OnSave = Refresh;What is the plan, what does this do?Channels contains the refresh-slot (which reloads the list) and gives it to the list items and the list items give the slot to the edit-popup. When you have edited a line and you click "save" this Refresh-slot will be fired and so the list reloads. Voila :-)Overview:List-Refresh (slot)-Items (object, that are connected via OnSave to Refresh)
Item-OnSave (slot property)-edit (slot, that opens the EditPopup and connects Item.OnSave to EditPopup.OnSave)
EditPopup-OnSave (slot property)-save (slot, that fires OnSave)
Hope this helps.Chris
My recommendation is just a good/common approach for the editing and refreshing part (because I couldn't see any solution on the screenshot this way).
For the other issue:Whenever you initialize or reload your list onLoadItem is called. As far as I can see, in onLoadItem you access already via device class to the data (e.g. Data::Device.ChannelsCusName[itemNo]) and set it in the list. If you see at beginning the "wrong" (default) values, so I guess this is because this wrong values are stored in your device data (e.g. in ChannelsCusName array)?
as far as I understood your initialization problem, it is maybe more related to the data provider instead of the usage of the vertical list.
Once the vertical list is created, automatically the content is loaded.
Please ensure that the Data::Device contains a valid content and that the Data::Device object was not removed by the Garbage Collector. Please consider the livetime of autoobjects.
In order to prevent the Garbage Collector from freeing an autoobject, please add a variable to the root class, set the type to your class Data::Device and the value to the instance (autoobject) of the class.
I hope this helps....
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!