PDA

View Full Version : [OPEN] Final Build (ant) :: still missing some (event) Classes



YomeKitsuma
11 Oct 2012, 11:40 PM
Hi,

Here what i've got when build with ant (sencha ant build) :



Creating Application Cache with manifest http://dev.tag-all.com:28880/build/TagAll/production/cache.appcache
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 1) http://dev.tag-all.com:28880/build/TagAll/production/index.html
Application Cache Progress event (1 of 1)
Application Cache Cached event
Failed to load resource: the server responded with a status of 404 (Not Found) http://dev.tag-all.com:28880/build/TagAll/production/event/publisher/Dom.js?_dc=1350026474009



This is something that I've got in "development" when I do not properly set the "Ext.Loader.setPath"

With =


//<debug>
Ext.Loader.setPath({
'Ext': '../../../../Library/touch/src',
'Tall' : '../../../../Library/tall/src',
'TagAll': 'app'
});
//</debug>




[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.component' of: 'Ext.dataview.DataView' with: 'Ext.Component'. Be sure it's intentional.sencha-touch.js:600 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)
[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.mask' of: 'Ext.LoadMask' with: 'Ext.Mask'. Be sure it's intentional. sencha-touch.js:600 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)
[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.container' of: 'Ext.dataview.DataView' with: 'Ext.Container'. Be sure it's intentional. sencha-touch.js:600 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)
[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.viewport' of: 'Ext.viewport.Android' with: 'Ext.viewport.Default'. Be sure it's intentional. sencha-touch.js:600 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)


All go fine...

And without =


//<debug>
Ext.Loader.setPath({
//'Ext': '../../../../Library/touch/src',
'Tall' : '../../../../Library/tall/src',
'TagAll': 'app'
});
//</debug>



sencha-touch.js:9942 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)

GET http://dev.tag-all.com:28880/TagAll/tagall/applications/mobile/event/Dispatcher.js?_dc=1350027513861 404 (Not Found) sencha-touch.js:7977 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)



GET http://dev.tag-all.com:28880/TagAll/tagall/applications/mobile/event/publisher/Dom.js?_dc=1350027513871 404 (Not Found) sencha-touch.js:7977 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)



Uncaught Error: [Ext.Loader] Failed loading './event/Dispatcher.js', please verify that the file exists sencha-touch.js:8319 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)



Uncaught Error: [Ext.Loader] Failed loading './event/publisher/Dom.js', please verify that the file exists sencha-touch.js:8319 (http://dev.tag-all.com:28880/Library/touch/sencha-touch.js)




What I've understood is that issue comes from the "microloader"...

So actually it seems that is the only last step to have a good build (ok, there is also the problem pointed else where, that the app.appcache has a final "," which cause problem)

So, I'am adding in "app.js" the Requires for ALL the Ext event...



Ext.application({

name : 'TagAll',


requires : [
'Ext.MessageBox',
//-----fixing bug for build---------------
'Ext.event.*',
//----------------------------------------
'Ext.data.proxy.LocalStorage',


And now.... HOW FUNNY... i'am getting this error :



Document was loaded from Application Cache with manifest http://dev.tag-all.com:28880/build/TagAll/production/cache.appcache
Application Cache Checking event
Application Cache NoUpdate event


GET http://dev.tag-all.com:28880/build/TagAll/production/chart/series/ItemPublisher.js?_dc=1350030457345 404 (Not Found) ItemPublisher.js:1 (http://dev.tag-all.com:28880/build/TagAll/production/chart/series/ItemPublisher.js?_dc=1350030457345)


/chart/series/ItemPublisher.js


...but the application EVER NEVER USED CHART !!!!!!!!!

YomeKitsuma
12 Oct 2012, 1:31 AM
After investigation, all appends in the compiled app.js =>

(somewhere in the code - see at the end of the obj definition ;-)



defaultSetupConfig:{
eventPublishers:{
dom:{
xclass:"Ext.event.publisher.Dom"
},
touchGesture:{
xclass:"Ext.event.publisher.TouchGesture",
recognizers:{
drag:{xclass:"Ext.event.recognizer.Drag"},
tap:{xclass:"Ext.event.recognizer.Tap"},
doubleTap:{xclass:"Ext.event.recognizer.DoubleTap"},
longPress:{xclass:"Ext.event.recognizer.LongPress"},
swipe:{ xclass:"Ext.event.recognizer.HorizontalSwipe"},
pinch:{xclass:"Ext.event.recognizer.Pinch"},
rotate:{xclass:"Ext.event.recognizer.Rotate"}
}
},
componentDelegation:{
xclass:"Ext.event.publisher.ComponentDelegation"},
componentPaint:{xclass:"Ext.event.publisher.ComponentPaint"},
elementPaint:{xclass:"Ext.event.publisher.ElementPaint"},
elementSize:{xclass:"Ext.event.publisher.ElementSize"},
seriesItemEvents:{xclass:"Ext.chart.series.ItemPublisher"}
}


So, back to the first "bug/issue", If I remove the "Ext.event.*" (and previouslt : "Ext.event.publisher")... I'll go back at the start... and can not resolve this issue

:( (:| :-? :s :((

YomeKitsuma
12 Oct 2012, 3:35 AM
So, to make my application working, i've just have to add this =



Ext.application({

name : 'TagAll',


requires : [
'Ext.MessageBox',
//-----fixing bug for build---------------
'Ext.event.*',
'Ext.chart.series.ItemPublisher',
'Ext.log.Logger',
'Ext.log.writer.Console',
'Ext.log.formatter.Default',
'Ext.fx.Runner',
'Ext.viewport.Viewport',
//----------------------------------------


What is really BORRING is that "we" (the coder/user/developer) have to add this manually

:))

But NOW, this is the "cached" / "update" thing that did not works...

We have to clean the localStorage manually, which is impossible to ask this to our user !!!!!

YomeKitsuma
12 Oct 2012, 4:19 AM
The last thing I've found to resolve this issue (workarround) is:

Delete the "archive" folder before starting "sencha ant build" command

~o)

OR

If you change the "update" parameters in the app.json to "full" (instead of "delta" all goes fine ;-)



"js": [
{
"path": "../../../../Library/touch/sencha-touch.js"
},
{
"path": "app.js",
"bundle": true,
"update": "full"
},
{
"path": "../../../../Library/tall/tall.js",
"update": "full"
}
],


HOPE THIS HELP (for Sencha team and Users !!)

dongryphon
12 Oct 2012, 9:52 PM
This looks similar to some bugs we have fixed recently but I am going to open this so we can check in to your test case. Thanks.

dongryphon
12 Oct 2012, 9:54 PM
Also - what versions of Touch and Cmd are you using? If you mentioned it I missed it. Thanks.

dreitman
20 Oct 2013, 4:33 PM
What YomeKitsuma (http://www.sencha.com/forum/member.php?370095-YomeKitsuma) suggested fixes my build as well.

I'm running sencha cmd 4.0.0.203 with Sencha Touch 2.3.

It may also be worth pointing out that I had built my app using Cmd 4 and Touch 2.3 that was released at SenchaCon and performed an app upgrade a couple weeks ago.

eeckhev
3 Dec 2013, 11:13 PM
I've the same issue! When using



eventPublishers: {
touchGesture: {
recognizers: {
swipe: {
// this will include both vertical and horizontal swipe recognizers
xclass: 'Ext.ux.event.recognizer.Swipe'
}
}
}
},


production build fails with serveral missing classes.

I've to require the following classes to make it work.


'Ext.event.*','Ext.event.publisher.*',
'Ext.event.recognizer.*',
'Ext.chart.series.ItemPublisher'


Sencha CMD v4.0.0.203
ST 2.3 Nightly build 20131126

Why has the chart.series.ItemPublisher to be required, when not using any charts?`