View Issue Details

IDProjectCategoryView StatusLast Update
0005279NoesisGUIUnrealpublic2026-10-26 11:18
Reporternjahs Assigned Tohcpizzi  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version4.0 
Target Version4.0.2 
Summary0005279: Inherited FieldNotify members do not update
Description

FieldNotify members declared on a base class never update their bindings on objects of a derived class.
Example: bIsSelected (FieldNotify) is declared on a list item base class, XAML binds {Binding bIsSelected} on rows whose objects are of a derived class; the initial value is shown, later changes are not.
Cause: each NoesisTypeClass registers only the field notifications of its own UClass (properties and functions iterated with ExcludeSuper), and SetObjectFieldNotifications binds only the notifications of the object's most derived type class.

Repro:

UCLASS()
class UExampleItemBase : public UMVVMViewModelBase
{
    GENERATED_BODY()
public:
    UPROPERTY(BlueprintReadOnly, FieldNotify, Category="Example")
    bool bIsSelected = false;
    void SetSelected(bool bValue) { UE_MVVM_SET_PROPERTY_VALUE(bIsSelected, bValue); }
};

UCLASS()
class UExampleItem : public UExampleItemBase   // no FieldNotify members of its own needed
{
    GENERATED_BODY()
};

<ToggleButton IsChecked="{Binding bIsSelected, Mode=OneWay}"/> <!-- DataContext: a UExampleItem -->

Steps: set an UExampleItem as DataContext, read the initial value (correct), call SetSelected(true).
Expected: the binding updates.
Actual: it keeps the initial value. The same member declared directly on UExampleItem updates.

PlatformWindows

Relationships

related to 0005278 assignedhcpizzi Field with plain native getter does not update properly 

Activities

njahs

njahs

2026-10-25 01:49

reporter   ~0012790

NoesisFillTypeClassForUClass fills FieldNotifications, ArrayFieldNotifications and MapFieldNotifications of a type class only from the members of its own UClass (ExcludeSuper), which is consistent with the reflection hierarchy (the base members live in the base type class). NoesisTypeClass::SetObjectFieldNotifications, however, iterates only this->FieldNotifications etc. of the object's most derived type class. The delegates of the base type classes are never added to the object, so INotifyFieldValueChanged broadcasts of inherited field ids reach no Noesis property.

Propsed fix: Walk the type class hierarchy when binding the delegates. Excerpt (complete diff available on request):

for (const NoesisTypeClass* Level = this; Level != nullptr; Level = Level->GetSuperTypeClassForNotifications())
{
    for (auto& FieldNotification : Level->FieldNotifications)      { /* AddFieldValueChangedDelegate ... unchanged */ }
    for (auto& FieldNotification : Level->ArrayFieldNotifications) { /* unchanged */ }
    for (auto& FieldNotification : Level->MapFieldNotifications)   { /* unchanged */ }
}

// Type class of the UClass super class, or null at the root.
const NoesisTypeClass* GetSuperTypeClassForNotifications() const
{
    UClass* SuperClass = Class->IsA<UClass>() ? ((UClass*)Class)->GetSuperClass() : nullptr;
    NoesisTypeClass* const* SuperType = SuperClass ? ClassMap.Find(SuperClass) : nullptr;
    return SuperType ? (*SuperType) : nullptr;
}

Issue History

Date Modified Username Field Change
2026-10-25 01:46 njahs New Issue
2026-10-25 01:46 njahs Description Updated
2026-10-25 01:49 njahs Note Added: 0012790
2026-10-26 11:17 sfernandez Assigned To => hcpizzi
2026-10-26 11:17 sfernandez Status new => assigned
2026-10-26 11:17 sfernandez Target Version => 4.0.2
2026-10-26 11:18 sfernandez Relationship added related to 0005278