1. #1
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    336
    Vote Rating
    14
    svenna will become famous soon enough svenna will become famous soon enough

      0  

    Default adding requires to views (Touch 2)

    adding requires to views (Touch 2)


    While debugging it does not really matter, but when building for production and moving away from the loader (using sdk-tools) it does.

    1. Why does not designer add e.g Ext.Img and components to the requires property of a class? I can't find a reason that it should not.

    2. How do I best resolve this? Just to confirm it's the only issue in the current development I added manually edited the deploy files, before building testing/production/native packages with the sdk-tools. This is a bit of work, when you need to do all views at once, and as expected the files are overwritten when doing changes from designer.
    Sven Tore Iversen

  2. #2
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    336
    Vote Rating
    14
    svenna will become famous soon enough svenna will become famous soon enough

      0  

    Default


    For now I'm using the new override feature in Designer on all views.
    The override does nothing except at the widgets to the requires list.

    This removes the warning for test builds, and enables production/native build.

    eg:
    Code:
    Ext.define('EcoInteractive.view.override.MainMenu', {
        requires: [
            'EcoInteractive.view.MainMenu',
            'Ext.Img',
            'Ext.plugin.ListPaging',
            'Ext.plugin.PullRefresh',
        ]
    }, function() {
        Ext.override(EcoInteractive.view.MainMenu, {
            
        });
    });
    Sven Tore Iversen

  3. #3
    Sencha User
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    974
    Vote Rating
    47
    ssamayoa has a spectacular aura about ssamayoa has a spectacular aura about

      0  

    Default


    You can safely remove "
    Ext.override
    " since the porpuse of the override is the requires clause and nothing is really overriden.

    Regads.
    UI: Sencha Architect 2.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  4. #4
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    336
    Vote Rating
    14
    svenna will become famous soon enough svenna will become famous soon enough

      0  

    Default


    True, thanks
    Sven Tore Iversen