Dave.Sanders
18 Jun 2009, 12:59 PM
This question is mainly for Saki, but I figured I'd post it publicly in case someone can beat him to the answer. :)
On this tutorial: http://extjs.com/learn/Tutorial:Application_Layout_for_Beginners I understand why someone would use this pattern. But I'm struggling to easily extend the "app" function that I create to include Ext.util.Observable. I'm trying to easily add in the event handling model into my "app" object.
I've tried to do an Ext.extend(mynamespace.app, Ext.util.Observable); after the declaration of the mynamespace.app, but it didn't seem to work. I also tried add it into the init function, but again, no dice.
What am I missing? Or does this method of setting up your main application function not work with extend? Another idea I had would be to just add a "var e = new Ext.util.Observable();" to my app object and just create pass through functions for AddEvents, FireEvent, and so on. But I'm guessing there's an easier way, or I shouldn't be doing it this way.
Thanks
Dave
On this tutorial: http://extjs.com/learn/Tutorial:Application_Layout_for_Beginners I understand why someone would use this pattern. But I'm struggling to easily extend the "app" function that I create to include Ext.util.Observable. I'm trying to easily add in the event handling model into my "app" object.
I've tried to do an Ext.extend(mynamespace.app, Ext.util.Observable); after the declaration of the mynamespace.app, but it didn't seem to work. I also tried add it into the init function, but again, no dice.
What am I missing? Or does this method of setting up your main application function not work with extend? Another idea I had would be to just add a "var e = new Ext.util.Observable();" to my app object and just create pass through functions for AddEvents, FireEvent, and so on. But I'm guessing there's an easier way, or I shouldn't be doing it this way.
Thanks
Dave