You can clone with
No one assigned
Not sure what is going on in the override file.
Why is an anonymous function being run to call Ext.override to run initComponent? Doesn't the application run the override file and get you all the way to initComponent without wrapping it up already?
Is there a better way?
That function, passed as the second argument to Ext.define(), is run after the class loader has finished loading the declared dependencies. In this case, it means that it won't attempt to override the main class until that main class is actually available. Otherwise it would throw an error.
Gives me a clue to some other errors in another app that has some overrides. So this isn't a Architect workaround? I guess the question is, would this be done the same way without Architect?
Ah - the class isn't created until the feed is loaded.
This is not Architect-specific; even in manual code you'd have to make sure the target class is loaded before attempting to override it.
Note, however, that this particular syntax is only for Ext JS 4.0.
In Ext JS 4.1 and Sencha Touch, we generate an alternate syntax which basically accomplishes the same thing, but is preferred because it handles certain scenarios better as well as being a simpler syntax:
So if I'm using 4.1.1 either way would work? 4.1.1 will wait to run initComponent when the class is created and available?
In 4.1 either way will probably work in most cases, but the new declarative form is preferred -- like I sad it works better in some edge cases and it's just a nicer syntax.
Note this doesn't have anything to do with running initComponent, this is only to control when it is defined. It will of course only be executed when the component is instantiated.
Refer to the API docs for a better introduction to overriding: http://docs.sencha.com/ext-js/4-1/#!/api/Ext-method-define
4.1.1 does choke on the old syntax. Not sure why. No error comments come back. I get to the point that the override is loaded and the app quits. I'll try the new syntax.