130 views
in GUI Development by

Hi,

We are using Vertical list. the list view contains the text boxes given below.

 

In this, description contains static string value, value_text and unit_text  contains dynamic value which will be updated by external source.

During initialization, value text and unit text is updated for each menu item. so when loading(onloaditem) all the description, value text and unit text is updated correctly.

Once I am checking the changes periodically, value text and unit text in the view is got hidden.

But I checked that visibility of both variables are true and the values are not null, values are also the same as previous only. what might be the root cause of this kind of scenario and how to rectify this ?

                             

thank you,

Meenakshi Sundaram S R.

1 Answer

0 votes
by

Hello Meenakshi Sundaram S R.,

two assumptions:

Possibility 1: the Text views are not correctly initialized in the implementation of the OnLoadItem method. For example, the views are initialized with empty strings or no strings are assigned to the Text views.

Possibility 2: the data for the corresponding items is not available. For example, it contains empty strings.

From experience in preceding support cases I would go for the first possibility. Please ensure that OnLoadItem initializes all views of the item. Please remember, that Vertical List does not retain the data. It is just a view. When OnLoadItem is invoked, it is thus essential to initialize the item view completely. See also Implement the OnLoadItem slot method to load the items.

In case of the second possibility: if you use an autoobject to store the data, ensure that the autoobject is not reclaimed by the garbage collection. This may occur if the autobject is not in use. See also Lifetime of an autoobject.

I hope it helps you further.

Best regards

Paul Banach

by

Hi Paul,

Thanks for the response. We have verified that both the possibilities you have mentioned is not happening in this scenario. As I mentioned earlier

" But I checked that visibility of both variables which is true and the values are not null ".  Vertical list view has initialized with valid string values and while loading for first time we are able to get the initialized values. When we are loading again while scrolling or explicitly invoking Onloaditem method the description (item name) contains static string value is shown in the screen, but value_text and unit_text  contains dynamic value which will be updated by external source is getting hidden. 

 

For reference: In Vertical List view, description = one, value_text = 0.0, unit_text = kk

 

 

You can see that unit_text.String has valid string value and the visibility is also true. But in the screen that value is not visible. This is happening when the item is getting reloaded in the cache memory. Otherwise the unit_text and value_text is shown without any problem.

As I observed while we are reloading (calling onload item) this problem is happening, so let me know how vertical list cache is maintained and how the items getting loaded. Is there any possibility that dynamic data might become null while the vertical list is getting loaded ?

 

Thank you,

Meenakshi Sundaram S R.

by

Hi Meenakshi Sundaram S R.,

If I understood your description, you are directly "calling onload item". If yes, this will not work. When the data displayed in an item changes, your implementation should only 'invalidate' the affected item within the list. The list will then schedule and perform the necessary OnLoadItem invocations. To invalidate an item or a range of items, use the method InvalidateItems(). See also the section  Force the list to reload items.

I hope it is the cause of the issue.

Best regards

Paul Banach

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

...