Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-113

PropertyChanged of RealmObject does not fire

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      Questions:

      Hi, the PropertyChanged event of RealmObject does not fire in my project. I think that is because something wrong in my code. In order to find out the reason, I created a repro, https://github.com/AlonikiX/RPCNE.git, and I already set up the ROS on AWS, so just simply run the project, it should work. There are 4 RealmObject in this repro, they are all in Models folder. And the main page is HomePage, which is located in Views folder and its view model is in ViewModels. When running the app, there will be a list view, and its cell properties are binding with different objects. And the bottom buttons can modify different properties.

      StackOverflow:

      https://stackoverflow.com/questions/48533217/realm-dotnet-nested-realmobject-propertychanged-does-not-fire

      Goals

      When clicking Age, the RPDeviceList.RPDevices[x].RPObject.PropertyChanged should fire, and the UI should update automatically as well. Also, if any changes via ROS, the app should also have the same behaviour. The goal is how to implement auto update of the UI, when any RealmObject changed by local operations or remote operations. And if it is possible, I look forward to knowing what causes the issue.

      Expected Results

      All PropertyChanged events I added to different objects should fire, and UI should update automatically.

      Actual Results

      The PropertyChanged of the nested object RPObject does not fire, the UI does not update neither, however, its data does change. The non-nested property RPDevice.Battery can update the UI correctly, but PropertyChanged does not fire as well. When I move add property changed event to the button click command, it sometimes can fire but the UI still does not update.

      Maybe I am just being tricked by some stupid mistakes, but I hope anyone can help me. Thank you.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: