Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-2497 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    24
    Vote Rating
    3
    ElCondor1969 is on a distinguished road

      0  

    Default Bug in content of "Viewport.js"

    Bug in content of "Viewport.js"


    Hi!.
    I seem to have found a bug in the program.
    I have a project with two controllers and three views.
    The main viewport is created automatically (autoCreateViewport property is true).
    I want only two of these views are loaded when the application starts and I want the third view is loaded only when is loaded the second controller.
    In fact, the second controller references correctly the third view and it is only referenced by this controller and no any other objects.
    Nevertheless, when the application starts, while the second controller correctly is not loaded, the third view is loaded anyway.
    The problem for me lies in the file "Viewport.js" that is automatically created by the program:


    Ext.define ('App.view.Viewport', {
    extend: 'App.view.AppViewport',
    renderTo: Ext.getBody (),
    requires: [
    'App.view.AppViewport',
    'App.view.View1',
    'App.view.View2',
    'App.view.View3'
    ]
    });


    As you can see, in my opinion, the error is that the file is created including all the views in the project in the "requires" property, regardless of whether or not the views are to be obtained later, according to various settings of the project.
    In my case, View3 should not be included in the list.
    I think it would be appropriate to correct the creation and editing of the file "Viewport.js."


    Thanks in advance.
    Bye!

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Hrm, have you removed these views from Application?

    Does the viewport use these views?

    Could you attach a project archive that illustrates the problem?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    24
    Vote Rating
    3
    ElCondor1969 is on a distinguished road

      0  

    Default More information

    More information


    Hi!
    Thank you very much for your kindly reply.
    I shall soon give you more detailed information.

    In my project the object "Application" references only the controller "Ulisse" and no views:

    Img1.PNG

    The controller "Ulisse" references only the two views "UlisseViewport" and "FinestraConnessione":

    Img2.PNG

    The controller "Indipendenti" references only the view "Independenti":

    Img3.PNG

    On the other hand, the viewport "UlisseViewport" not anything references:

    Img4.PNG

    Despite all these settings when the application starts, the view "Indipendenti" is loaded even though it should not be loaded at boot time:

    Img5.PNG

    In my opinion this is because the file "Viewport.js" (file automatically generated by Architect) the viewport referencing all three views regardless the settings in the project:

    /*
    * File: app/view/Viewport.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.define('Ulisse.view.Viewport', {
    extend: 'Ulisse.view.UlisseViewport',
    renderTo: Ext.getBody(),
    requires: [
    'Ulisse.view.UlisseViewport',
    'Ulisse.view.FinestraConnessione',
    'Ulisse.view.Indipendenti'
    ]
    });

    For me, the bug is hiding just in the generation of this file. It would seem that it is created including all the views in the project ignoring all other settings in the project.


    If you need any other information, I am at your disposal.


    Thanks in advance.
    Bye.

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Thanks for the detailed info.

    What does Ulisse.view.UlisseViewport look like and what other views does it use?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    24
    Vote Rating
    3
    ElCondor1969 is on a distinguished road

      1  

    Default More information

    More information


    Hi!

    The viewport "Ulisse.view.UlisseViewport" look like:

    Img001.PNG

    and as you can see (in the tree and in the property editor), it does not uses instances of the views in the project.
    If you need some additional information, let me know as well.
    Thanks in advance.

    Bye.

  6. #6
    Sencha User
    Join Date
    Mar 2010
    Posts
    24
    Vote Rating
    3
    ElCondor1969 is on a distinguished road

      0  

    Default Missing bug information

    Missing bug information


    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.1.1-gpl
    Browser versions tested against:
    • Chrome 22.0.1229.94 m
    HELPFUL INFORMATION


    Operating System:
    • WinXP Pro 5.1.2600 SP3 Build 2600

Thread Participants: 2