1. #11
    Sencha User
    Join Date
    Jan 2012
    Posts
    1
    Vote Rating
    0
    murthyk is on a distinguished road

      0  

    Default


    I am also in the same boat. Can anyone please answer directly (Perhaps by showing an example) how to write code for the content of each tab in a separate script file. I have already tried a couple of html techniques (#include, and <script tag>), but they are not working. Coming from OO language programing, I saw immediately that enabling modularity is a key thing for any framework. It is kind of scary to see a "blob of code" in one big file .. besides, debugging is a nightmare if I miss something minor in syntax.

    I am new to JavaScript.. so, I appreciate any tools to check syntax of JS as well.. (I have already downloaded Komodo, btw)

  2. #12
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    544
    Vote Rating
    18
    estesbubba will become famous soon enough

      0  

    Default


    Create a file MyView.js and put this in it

    Code:

    Ext.define('MyApp.view.MyView', { extend: 'Ext.Container', xtype: 'myview', ....})

    Then in your tab panel use xtype: 'myview' in its config instead of xtype: 'component'. Look at the Touch source code. Their components are no different than your components.