1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    60
    Vote Rating
    0
    stirucherai is on a distinguished road

      0  

    Default MVC : working in PR1 but not on PR3

    MVC : working in PR1 but not on PR3


    Hi,

    I have code which had following
    Main View : Just in incantations topPanel and bottomPanel using xtype:{'topPanel'}
    topPanel View
    bottomPanel View

    In the Main controller was using getMainview=this.getMainView().create();

    All was working fine with PR1 but when I copied PR3 (sencha-touch-debug.js) -- I don't see topPanel and bottomPanel. I checked in javascript console and these were never created. No error as well.

    Any help will be highly apperciated


  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    I'm afraid I cannot help without a better explanation and some code.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    60
    Vote Rating
    0
    stirucherai is on a distinguished road

      0  

    Default Code Attached

    Code Attached


    app.js
    Code:
    Ext.Loader.setConfig({ enabled: true });
    Ext.require([        
      'Ext.XTemplate',   
      'Ext.Panel', 
      'Ext.Button',    
      'Ext.List'
     ]);
       
      
    Ext.application( {
     name : 'NDP',
     controllers: ['Main'],
     initialize: function() {
      console.log("Entering App Initialization");
      //var dbconnval =  {dbName : "contacts", dbDescription: "testdb"};
      //Ext.DbConnection = new Ext.Sqlite.Connection(dbconnval);
     },
     launch:function()
     {
      
     }
    });
    Main.js (Contoller)
    Code:
    Ext.define('NDP.controller.Main', {
        extend: 'Ext.app.Controller',
        config: {
            
        },
        views : [
                  'Main',
                  'topPanel',
                  'bottomPanel',
                  'bottomLeftPanel'
                 ],
                 
        stores: [ 'menuList'
                 ,'pattuLyric'
                ],
        init: function() {        
          console.log('Init home controller');
          getMainview=this.getMainView().create();
                 }
    });
    Main.js (View)
    Code:
    Ext.define('NDP.view.Main', {
        extend: 'Ext.Container',
        layout: 'vbox',
        title: "Home View",
        xtype:'main',
        requires: [
                   'NDP.view.topPanel',
                   'NDP.view.bottomPanel',
                   'NDP.view.bottomLeftPanel',
                   'NDP.view.bottomRightPanel'
                 ],
        config: {
         fullscreen : true,
      layout :
       {
        type : 'vbox'
       },
      items: [
               {
                xtype:'topPanel',
                id:'topPanel',
                flex:1
               },
               {
                xtype:'bottomPanel',
                id:'bottomPanel',
                flex:1
               }
              ]
     },
     initialize: function() {
      console.log('initialize home view');
     }
    });
    topPanel.js (View)
    Code:
    Ext.define('NDP.view.topPanel', {
        extend: 'Ext.Panel',
        layout: 'fit',
        alias: 'widget.topPanel',
        xtype:'topPanel',
         
        config: { 
         items: [{
                 xtype:'toolbar',
                 defaults: {
            iconMask: true,
            ui: 'plain'
           },
             items:[{xtype:'spacer'},
                    { 
                xtype:'panel',
                id:"scaleValue", 
                style:"color:black; background-color:white",
                height:50,
                width:300        
                
                }]
              }]
        },
        initialize: function() {
         console.log("Init: topPanel Log");
        }
    });
    bottomPanel.js (view)
    Code:
    Ext.define('NDP.view.bottomPanel', {
        extend: 'Ext.Panel',  
        xtype:'bottomPanel',   
        requires: [
                   'NDP.view.bottomLeftPanel',
                   'NDP.view.bottomRightPanel',
                 ],
        config: {
            layout:'hbox',
            flex:1,
         items: [{
                 xtype:'bottomLeftPanel',
                 id:'bottomLeftPanel',
                 flex:.3
              },
              {
              xtype:'bottomRightPanel',
              id:'bottomRightPanel',
              flex:.7
           }
              ]
        },
        initialize: function() {
         console.log("Init: bottomPanel Log");
        }
    });
    As mentioned -- the same code works with no issues on PR1. When I copied PR3 no error but it does not reach topPanel.js or bottomPanel.js

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Posts
    60
    Vote Rating
    0
    stirucherai is on a distinguished road

      0  

    Default


    Just removed the init:{ <What ever code >} from each of the view and it worked.

Thread Participants: 1

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