-
17 Oct 2012 1:42 AM #1
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!
-
17 Oct 2012 7:52 AM #2
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
-
17 Oct 2012 10:57 PM #3
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.
-
18 Oct 2012 1:35 PM #4
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
-
19 Oct 2012 1:38 AM #5
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.
-
24 Oct 2012 4:32 AM #6
Missing bug information
Missing bug information
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.1-gpl
- Chrome 22.0.1229.94 m
Operating System:- WinXP Pro 5.1.2600 SP3 Build 2600
-
12 Nov 2012 7:33 AM #7
Addressing this now ... I'll let you know what our proposal is
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
Known Bugs in Architect Latest
-
13 Nov 2012 1:47 PM #8
After some analysis the team seems to think we should simply remove the requires statement altogether from the generated Viewport? Do you agree this solves the issue?
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
Known Bugs in Architect Latest
-
13 Nov 2012 11:54 PM #9
Hi Phil!
In fact in my project I have just adopted this solution, removing unwanted items from the property "requires" from my own copy of Viewport and I verified that it prevents premature and unwanted loading of the views.
So, for me the solution is the right one.
Bye!
-
16 Nov 2012 12:32 PM #10
Awesome! It's going to be in the 2.2 release. Sorry you'll have to wait until then. No time for anymore patch releases.
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
Known Bugs in Architect Latest
Success! Looks like we've fixed this one. According to our records the fix was applied for
DSGNR-2497
in
Sprint 34.


Reply With Quote