Can't find the View Controller in the enyo.$ hierarchy

edited October 2013 in Enyo 2.4
When I call new on a ViewController kind it isn't showing up in the enyo.$ hierarchy. How can I get a handle on it to call methods such as resetView?

Comments

  • You can just save the result of the new call into a variable and use that to refer to the view controller.

    As for it not getting saved into enyo.$... that happens in code in enyo.Control, so any object that's not derived from Control won't go into that hash. Internally, we use the enyo.$ hash in the dispatcher to find targets for DOM events, which is why we don't store IDs for non-DOM-based components.
  • Fair enough. I started attaching it to the Application's controller block dynamically which seems to work.
Sign In or Register to comment.