Hello,
I have a problem in updating a vertical list.
I have created a vertical list to show some "cycle phases" and the time associated to each phase.
So I have created a class for the list item in the Application unit which contains a property name and a propery value.

When the page loads, the list displays as follows:

The goal is for the list to display the current phase and the remaining time in black, then a countdown to zero for each phase. As suggested in the guides, I set up two arrays to display the name (PhaseNamesArray) and the remaining time of the phase (PhaseTimesArray). So the method called when the list loads is as follows:
//IntemNo indica elemento attuale della lista (da 0 a numero di elementi lista)
var int32 itemNo = PhaseVerticalList.Item;
//Definisco la variabile con il tipo di elemeto della lista
var Application::CyclePhaseItem itemView = (Application::CyclePhaseItem)PhaseVerticalList.View;
// The implementation of this slot method does not match the item class
// specified in the associated list component. Or the slot method is not
// called in context of the OnLoadItem list operation.
if ( itemView == null )
return;
itemView.Name = PhaseNamesArray[itemNo]; //Nomi dati da array (con indice calcolato sopra)
itemView.Time = PhaseTimesArray[itemNo];
//Imposto altezza elementi in base al parametro ItemHeight
itemView.Bounds.size = PhaseVerticalList.ViewSize;
Set up a 100 ms timer which each time calls the following slot method:
var int32 SelectedItem = PhaseVerticalList.SelectedItem;
//Decremento tempo ciclo e array fase
Application::Device.CurrentCycleTime--;
PhaseTimesArray[SelectedItem] = PhaseTimesArray[SelectedItem] - 1;
//Aggiorno valore oggetto su lista
PhaseVerticalList.InvalidateItems(SelectedItem, SelectedItem);
if (Application::Device.CurrentCycleTime <= 0)
{
PhaseVerticalList.SelectedItem = PhaseVerticalList.SelectedItem + 1;
Application::Device.CurrentCycleTime = PhaseTimesArray[SelectedItem];
}
notifyobservers ^Application::Device.CurrentCycleTime;
The problem is that even though I changed the value of the PhaseTimesArray array and called the InvalidateItems method to update the modified item, it does not update and I don't understand why.
Note: The Application::Device.CurrentCycleTime value is used to display the current phase cell timer larger. The page, still sketchy, looks like this:
