1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Mykolayiv
    Posts
    100
    Vote Rating
    1
    rsqw is on a distinguished road

      0  

    Default Build problem

    Build problem


    Hi,

    In my application I have this code:
    Code:
    Ext.require(['CJ.core.extra.Application', 'CJ.core.config.utils']);
    Ext.onReady(function() {
        Ext.create("CJ.core.extra.Application", {
            name: 'CJ',
            appFolder: '/js/app',
            controllers: [
            //widgets
               ....
            //modules
                'CJ.modules....,
                'CJ.modules......',
                'CJ.modules.......',
                'CJ.modules..........',
    I've performed this
    sencha create jsb -a http://giggster.loc -p ./app.jsb
    sencha build -p app.jsb -d .

    Unfortunately, I can't see this code:
    Ext.create("CJ.core.extra.Application", {
    name: 'CJ',
    appFolder: '/js/app',
    controllers: [
    //widgets
    ....
    //modules
    'CJ.modules....,
    'CJ.modules......',
    'CJ.modules.......',
    'CJ.modules..........',
    in my all-classes and app-all files,

    What's the problem? Is this is my bug?

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


    Are you using MVC?
    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
    Jun 2011
    Location
    Ukraine, Mykolayiv
    Posts
    100
    Vote Rating
    1
    rsqw is on a distinguished road

      0  

    Default


    Of course, but I've extended Ext.app.Application and rewritten it's constructor, because in my app, MVC isn't enought, I need HMVC.

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


    Then you shouldn't be using Ext.onReady
    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.

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Mykolayiv
    Posts
    100
    Vote Rating
    1
    rsqw is on a distinguished road

      0  

    Default


    I don't understand, could you explain?

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


    If you are using MVC, then you should only use Ext.application not Ext.onReady
    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.

  7. #7
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Mykolayiv
    Posts
    100
    Vote Rating
    1
    rsqw is on a distinguished road

      0  

    Default


    I can't use Ext.application, because I need to create NS.core.Application instead of Ext.app.Application

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


    Ext.application is just an instance of Ext.app.Application so you should be able to create an instance of your NS.core.Application
    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.

  9. #9
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Mykolayiv
    Posts
    100
    Vote Rating
    1
    rsqw is on a distinguished road

      0  

    Default


    Ext.application.toString()
    "function (config) { Ext.require('Ext.app.Application'); Ext.onReady(function() { Ext.create('Ext.app.Application', config); });}"

  10. #10
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Mykolayiv
    Posts
    100
    Vote Rating
    1
    rsqw is on a distinguished road

      0  

    Default


    I've solved this problem by myself:
    Ext.application = function(a){Ext.require("NS.core.Application"); Ext.onReady(function(){
    Ext.create("NS.core.Application", a);
    })};

    I know it isn't a good decision, but I could find another way to solve the problem.

Thread Participants: 1