Observe property changes on object

I’m trying to observe property changes on childobjects in a class, but I’m not sure how to get it to work.

In my class I want to observe the changes on the object path “person.hair.color”.
Since both person and hair can be undefined (or null), I can not traverse down the object and use the BindingEngines propertyObserver.

I think it should be possible to make this work using the Binding systems “Parser” class to create a BindingExpression, but I can’t figure out how to put the pieces of the puzzle together.

I just found the expressionObserver method on the BindingEnginge. That might work…

I will get back with the result.

Yes, it seems to be working!

Hope this can help someone else.