-
9 Mar 2012 6:00 AM #1
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
-
12 Mar 2012 10:59 PM #2
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
-
13 Mar 2012 8:31 AM #3
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!
-
13 Mar 2012 11:19 PM #4
True, thanks
Sven Tore Iversen


Reply With Quote