Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    222
    Vote Rating
    0
    ByteLess is on a distinguished road

      0  

    Default webdesktop and load window issue

    webdesktop and load window issue


    having some issues with the webdesktop example.

    I am trying to link my independent running page within the webdesktop example and getting an error.
    Error is
    Code:
    TypeError: c is null
    My window create and load code is
    Code:
    createWindow : function(ttl,src){        var desktop = this.app.getDesktop();
            var win = desktop.getWindow('bogus'+src.windowId);
            if(!win){
                win = desktop.createWindow({
                    id: 'bogus'+src.windowId,
                    title:ttl,
                    width:640,
                    height:480,
                    //html : '<p>Something useful would be in here.</p>',
                    iconCls: 'bogus',
                    animCollapse:false,
                    //autoLoad: src,
                    loader : {
                        url : '/modules/app.html',
                        loadMask : true,
                        scripts: true,
                        autoLoad : true, // important
                        renderer : 'html', // this is also the default option, other options are data | component
                        success: function(el,response,opts) {
                            //your logic here
                        },
                        failure:function(el,response,opts) {
                            // your logical statements here
                        }
                    },
                    constrainHeader:true
                });
            }
            win.show();
            return win;
        }
    and my app.html file only loads app.js which is
    Code:
    /* * File: app.js
     *
     * This file was generated by Sencha Architect version 2.1.0.
     * http://www.sencha.com/products/architect/
     *
     * This file requires use of the Ext JS 4.1.x library, under independent license.
     * License of Sencha Architect does not include license for Ext JS 4.1.x. For more
     * details see http://www.sencha.com/license or contact license@sencha.com.
     *
     * This file will be auto-generated each and everytime you save your project.
     *
     * Do NOT hand edit this file.
     */
    
    
    Ext.Loader.setConfig({
        enabled: true
    });
    
    
    Ext.application({
        models: [
            'Model_Parts'
        ],
        stores: [
            'MyJsonStore'
        ],
        views: [
            'GridPanel'
        ],
        autoCreateViewport: true,
        name: 'MyApp'
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    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


    So where is the error being thrown and from what piece of code?
    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
    Oct 2007
    Posts
    222
    Vote Rating
    0
    ByteLess is on a distinguished road

      0  

    Default


    my app.html is loading fine in a separate window, but breaking when I linked within my webdesktop window.

    I posted my codes and error above.

    I guess the question is how do I link my app.html within webdesktop as the following codes are breaking.

    Code:
                    loader: {
                        url: '/modules/app.html',
                        loadMask: true,
                        scripts: true,
                        autoLoad: true, // important
                        renderer: 'html', // this is also the default option, other options are data | component
                        success: function (el, response, opts) {
                            //your logic here
                        },
                        failure: function (el, response, opts) {
                            // your logical statements here
                        }
                    },
    error is
    Code:
    TypeError: c is null
    Again when I type the address in url with http://192.168.1.155/modules/app.html
    it loads fine, but not with loader

    any help would greatly appreciated.

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    The Netherlands
    Posts
    4
    Vote Rating
    0
    kkerstjens is on a distinguished road

      0  

    Lightbulb


    i had the same problem, some how my store initializing was corrupted.

    When i opened my app.js, in de stores section, there was a unknown store loaded.
    After removing the line everything works fine.

    So I suggest to check the app.js file.

    Good luck!

  5. #5
    Sencha User
    Join Date
    Oct 2007
    Posts
    222
    Vote Rating
    0
    ByteLess is on a distinguished road

      0  

    Default


    Quote Originally Posted by kkerstjens View Post
    i had the same problem, some how my store initializing was corrupted.

    When i opened my app.js, in de stores section, there was a unknown store loaded.
    After removing the line everything works fine.

    So I suggest to check the app.js file.

    Good luck!
    which app.js you modified? the webdesktop app.js or the module's app.js

    can you post the app.js and highlight which code you remove and it worked?

    thanks once again.

  6. #6
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    The Netherlands
    Posts
    4
    Vote Rating
    0
    kkerstjens is on a distinguished road

      0  

    Default


    I did modified the app.js of the module.

    Maybe you can check if the number of Stores in de /store directory
    is the same as the number you declared in the stores: [ ] section.
    This should be exactly the same.

Thread Participants: 2