1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    3
    Vote Rating
    0
    rasi is on a distinguished road

      0  

    Question Extjs component Not created correctly inside jQuery

    Extjs component Not created correctly inside jQuery


    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

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Why are you mixing the frameworks? Going to be a lot to download.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    3
    Vote Rating
    0
    rasi is on a distinguished road

      0  

    Default


    Hi mitchellsimoens,

    I developed a web gui constructor using jquery before i found out about the ExtJS Framework, however if I stopped the current development and start over from scratch using ExtJS framework, it will take a long time to reach the stage where i am at now. So decided to use only some of the ExtJS components such as grid, panel to shorten my GUI component only like grid, panel etc. to support my gui constructor.

    Overall developing using with ExtJS has been a pleasant experience till I found another problem and think the root of the problem due to my attempt to load Extjs file dynamically

    please see the sample page I have created for you,

    this site will loading Ext Js (ext-all-debug.js) dynamically :
    you will see the error when seeing the console form in chrome
    http://devcrash.net/dynamic/

    and this site will loading Ext js static (write directly to the head tag of html) :
    no error found
    http://devcrash.net/static/

    Could you figure out what went wrong ?



    thankyou,
    rasi

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar