Hierarchy is in the Designer, where you place and lay out the widgets, for example:

Your script is fine as is. It’s something else. For example, if you accidentally create 2 identical widgets and place them on top of another and only update the one underneath, you will not see any changes.
This would explain why binding works but sending data directly does not.
Difficult to say what else can be causing this.