-
20 Feb 2012 3:12 PM #1
"sencha slice theme" throwing undefined errors and halting on 4.1?
"sencha slice theme" throwing undefined errors and halting on 4.1?
Preamble: I've done custom themes in 4.0.1/2 just fine with sliced images using Tools SDK 1.2.2, everything worked swimmingly, so I'm familiar with the process.
I was unable to run sencha slice theme on my somewhat involved app that we've recently ported to 4.1, so I created a completely stub app using the Ext MVC architecture example ( http://www.sencha.com/learn/architec...xt-js-4-part-1 and http://www.sencha.com/learn/architec...xt-js-4-part-2 ).
index.html:
app/Application.js:Code:<html> <head> <link rel="stylesheet" href="resources/css/my-ext-theme.css" type="text/css"> <script type="text/javascript" src="ext-4.1/ext-all-debug.js"></script> <script type="text/javascript" src="app/Application.js"></script> </head> <body> </body> </html>
And a very simple Viewport class with all the components removed from that same example:Code:Ext.Loader.setConfig({enabled: true}); Ext.application({ name: 'Panda', autoCreateViewport: true, launch: function() { } });
I followed the directions here for theme slicing: http://www.sencha.com/learn/theming/ .Code:Ext.define('Panda.view.Viewport', { extend: 'Ext.container.Viewport', requires: [], layout: 'fit', initComponent: function() { this.items = { xtype: 'panel', dockedItems: [{ dock: 'top', xtype: 'toolbar', height: 80, items: [{ xtype: 'component', html: 'Panda<br>Internet Radio' }] }] }; this.callParent(); } });
I can do the CSS generation fine, all succeeds there, but then I try running the "slice theme" and get the following:
This happens whether I use SDK Tools 1.2.2 or SDK Tools 2.0 Preview.Code:$ /Applications/SenchaSDKTools-1.2.2/command/sencha slice theme -d ext-4.1 -c resources/css/my-ext-theme.css -o resources/images/ -v Sencha Theme Generator Copyright (c) 2011 Sencha Inc. TypeError: 'undefined' is not a function Line: 0 Source: undefined TypeError: 'undefined' is not a function Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Observable Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Observable Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.data.Model Line: 0 Source: undefined
Am I doing anything wrong, or is there a bug here? I can bundle the app if needed, but 99% of everything needed should be pasted above.
-
21 Feb 2012 5:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
It's saying Ext.Loader isn't enabled
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Feb 2012 5:29 AM #3
I see the message, but look at the first line of app/Application.js, that I pasted above:
That's the best way I know how to enable it. Does it need to be placed somewhere else as well?Code:Ext.Loader.setConfig({enabled: true});
-
23 Feb 2012 6:43 AM #4
I'm getting the same errors, and some of the comments here confuse me.
I was under the impression that slicing has nothing to do with any html or an application as such. How can it from the command it's given?
e.g.:
All you give it is built CSS file, it has no knowledge of an application...Code:sencha slice theme -d ..\..\..\ThirdPartyReferences\Ext\ext-4.1.0-beta-3 -c css\Altus.css -o ..\..\..\ThirdPartyReferences\Ext\ext-4.1.0-beta-3\resources\themes\images\altus-blue -v
Anyway, my errors are:
At that point it hangs, doesn't error, doesn't do anything more.Code:C:\path\to\app>sencha slice theme -d ..\..\..\ThirdPartyReferences\Ext\ext-4.1.0-beta-3 -c css\Altus .css -o ..\..\..\ThirdPartyReferences\Ext\ext-4.1.0-beta-3\resources\themes\images\altus-blue -v Sencha Theme Generator Copyright (c) 2011 Sencha Inc. TypeError: 'undefined' is not a function Line: 0 Source: undefined TypeError: 'undefined' is not a function Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Obser vable Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Obser vable Line: 0 Source: undefined TypeError: 'undefined' is not an object Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.data.Model Line: 0 Source: undefined
This needs to work for 4.1 to be evaluated, and quite frankly I'm surprised it hasn't been sorted since I reported the same issue 6 weeks ago with 4.1.0-beta-1.
Cheers,
WestyProduct Architect
Altus Ltd.
-
23 Feb 2012 9:02 AM #5
Just tried with SDK tools 2.0.0 beta and similar problem:
Then hangs.Code:C:\Altus\repos\Altus\web\resources>sencha slice theme -d ..\..\..\ThirdPartyReferences\Ext\ext-4.1.0-beta-3 -c css\Altus .css -o ..\..\..\ThirdPartyReferences\Ext\ext-4.1.0-beta-3\resources\themes\images\altus-blue -v Sencha Theme Generator Copyright (c) 2011 Sencha Inc. TypeError: 'undefined' is not a function Line: 0 Source: undefined TypeError: 'undefined' is not a function Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Obser vable Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Obser vable Line: 0 Source: undefined TypeError: 'undefined' is not an object Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.data.Model Line: 0 Source: undefined
Product Architect
Altus Ltd.
-
23 Feb 2012 9:10 AM #6
I'm getting the exact same barrage of errors from running SDK 2.0 Beta against Ext 4.1 Beta 2 and Beta 3. If I revert my ext directory to version 4.0.7, everything works perfectly.
Here is my command:
Code:sencha.bat slice theme -d htdocs\includes\library\extjs\ext -c htdocs\includes\library\extjs\portal\resources\css\theme.css -o htdocs\includes\library\extjs\ext\resources\themes\images\custom -v
-
24 Feb 2012 1:58 AM #7
I have exactly the same problem (Mac OSX). Even if I use the original extjs css.
Edit: I just upgraded to ExtJS 4.1 Beta3 and the Developer Tools 2.0 Beta, but the bug still exists.Code:#$ sencha slice theme -d extjs/ -c extjs/resources/css/ext-all.css -o resources/images/ -v Sencha Theme Generator Copyright (c) 2011 Sencha Inc. TypeError: 'undefined' is not a function Line: 0 Source: undefined TypeError: 'undefined' is not a function Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Observable Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Observable Line: 0 Source: undefined Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.data.Model Line: 0 Source: undefined
-
24 Feb 2012 6:34 AM #8
-
24 Feb 2012 7:04 AM #9
i add a manifest file under the resources folder named manifest.js and references it through the options -m . It removed some errors but not all.
-- error messages --
TypeError: 'undefined' is not a function
Line: 0
Source: undefined
TypeError: 'undefined' is not a function
Line: 0
-- manifest.js --
Ext.Loader.setConfig({enabled: true});
Ext.onReady(function() {
/// add my customs components themes
Ext.manifest = {
widgets: [
{
xtype: 'widget.window',
ui : 'custom'
}
]
};
});
-
25 Feb 2012 4:51 AM #10
dougi: Does that stop the process blocking/never finishing for you, or does it still not finish even with the manifest? I still haven't found a solution to this, making it impossible to move forward, as we use custom themes that have to work on IE8.


Reply With Quote