User avatar
BenJo
Topic Author
Posts: 25
Joined: 20 Jun 2024, 15:42

Arrays & NoesisNotifyArrayPropertyPostAdd not updating Array.Count?

09 Jul 2026, 11:43

Hey, in Unreal, using a C++ ViewModel, we've been following how to add to arrays how the docs mention, using NoesisNotifyArrayPropertyPostAdd.
void UGameData::AddWeapon(UWeapon* Weapon)
{
    Weapons.Add(Weapon);
    NoesisNotifyArrayPropertyPostAdd(&Weapons);
}
However, we've notice if you add items later (e.g. not immediately), this isn't updating Array.Count when used in XAML. It's all working apart from that, the array items are appearing correctly, but the Count displays wrong.

Is that a bug, or do we need to do anything else to update it? Let me know if a bug, and I can log. We're using GUI 3.2.12.

Calling NoesisNotifyPropertyChanged() on the array does update it, but feels like that defeats the point of the NoesisNotifyArrayPropertyPostAdd().
 
User avatar
sfernandez
Site Admin
Posts: 3364
Joined: 22 Dec 2011, 19:20

Re: Arrays & NoesisNotifyArrayPropertyPostAdd not updating Array.Count?

09 Jul 2026, 13:18

This seems to be a bug, we're missing the invalidation of the Count property when adding/removing elements in those notifications.
Could you please report it in our bugtracker and we will fix it?
Thanks!
 
User avatar
BenJo
Topic Author
Posts: 25
Joined: 20 Jun 2024, 15:42

Re: Arrays & NoesisNotifyArrayPropertyPostAdd not updating Array.Count?

09 Jul 2026, 16:44

Thanks, issue logged #5120

Who is online

Users browsing this forum: Bing [Bot] and 1 guest