I am having issues accessing my custom method from a child component in my view. There is a button event I created in a popup that im using to call my method, but I keep getting an error saying that object has no attribute... Ihave tried the following:
root = self.view.getChild("root")
root = self.view.getChild("Shipping/Views/All Verified Popup").getChild("root")
Neither has worked and im not sure why..
If you use the Browse Properties button (to the right of the script editing text area) you will find that the OK button is disabled when you select the root. It's not a valid option.
Im actually referencing a project script in the custom method, based on how our code base is set up. Based on documentation I have looked at and my past experience I have had no issue using self.view.getChild().
Your code base requires you to call a custom method on the root container, just to call another method, rather than just calling the method in question directly? That seems inefficient and hard to follow to say the least.
Either way, I had no issues calling a custom method on the root container using either of the following valid syntax's. I created a custom method newMethod() on a root container, and then added a button to a flex container, inside the root. Then called the method with both versions and was successful.
The property selector will not allow you to select a container, because the intent is the user is selecting a property, however, that doesn't mean that the root container can not be referenced in script. The same is true in Vision.