Hi all, i use Extjs 4.0.7,
i need create an ExtJS component object inside jQuery $(function(){}), but it seems that the component is not initialized properly.
When i change the "$(function())" to the "Ext.onReady()" it executed successfully. Using "Ext.onReady()" is not an option for me because I am trying to load (inject) the page that contains the "Ext.onReady()" dynamically into the <div> tag (not iframe). At first i thought the script should execute as expected, however in actual test run the "Ext.onReady()" was never called at all.
I tried to debug using chrome, and I found out that when using $(function()) I got this error in file ext-all-debug.js line 41280
// throw error "Uncaught TypeError: Cannot call method 'setSize' of undefined"
//the surface is undefined
this.owner.surface.setSize(width, height);
while when using Ext.onReady
( using non dynamic method to load the page), the "this.onwer.surface" is defined correctly.
could someone shed a light to resolve this issue?
thankyou, rasi