PDA

View Full Version : "sencha slice theme" throwing undefined errors and halting on 4.1?

gav
20 Feb 2012, 3:12 PM
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/architecting-your-app-in-ext-js-4-part-1 and http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-2 ).

index.html:

<html>
<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>
<body>

</body>
</html>

app/Application.js:

Ext.application({
name: 'Panda',
autoCreateViewport: true,
launch: function() {
}
});

And a very simple Viewport class with all the components removed from that same example:

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',
}]
}]
};

this.callParent();
}
});

I followed the directions here for theme slicing: http://www.sencha.com/learn/theming/ .

I can do the CSS generation fine, all succeeds there, but then I try running the "slice theme" and get the following:

$/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 This happens whether I use SDK Tools 1.2.2 or SDK Tools 2.0 Preview. 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. mitchellsimoens 21 Feb 2012, 5:14 AM It's saying Ext.Loader isn't enabled gav 21 Feb 2012, 5:29 AM I see the message, but look at the first line of app/Application.js, that I pasted above: Ext.Loader.setConfig({enabled: true}); That's the best way I know how to enable it. Does it need to be placed somewhere else as well? westy 23 Feb 2012, 6:43 AM 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.: 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 All you give it is built CSS file, it has no knowledge of an application... Anyway, my errors are: 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 At that point it hangs, doesn't error, doesn't do anything more. 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, Westy westy 23 Feb 2012, 9:02 AM Just tried with SDK tools 2.0.0 beta and similar problem: 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 Then hangs. zombeerose 23 Feb 2012, 9:10 AM 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: 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 farion 24 Feb 2012, 1:58 AM I have exactly the same problem (Mac OSX). Even if I use the original extjs css. #$ 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

Edit: I just upgraded to ExtJS 4.1 Beta3 and the Developer Tools 2.0 Beta, but the bug still exists.

dougi
24 Feb 2012, 6:34 AM
same problem on windows xp

dougi
24 Feb 2012, 7:04 AM
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 --

/// add my customs components themes
Ext.manifest = {
widgets: [
{
xtype: 'widget.window',
ui : 'custom'
}
]
};
});

gav
25 Feb 2012, 4:51 AM
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.

westy
25 Feb 2012, 7:30 AM
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.

That's why I'm so surprised that no-one's jumped on this.
IE7 and 8 support is not optional, it's an absolute requirement for 90% of developers using Ext surely. It's been nearly two months now that it's not been possible to split a theme and still little interest in fixing it it seems...

Whilst we'd all love to target modern browsers it's simply not realistic out here in the real world.

gav
25 Feb 2012, 7:45 AM
I could get away without IE7 here, but unfortunately IE8 is a requirement. However, this bug's an all or nothing one. :)

zombeerose
25 Feb 2012, 11:45 AM
@gav

I run two slice commands - one for the theme & one with a manifest. Both freeze and yield no results.

I have submitted this thread as a support ticket so it hopefully gets more attention.

dougi
28 Feb 2012, 8:25 AM
Sorry for the delay.

it still not finish even with the manifest. it freezes.

gav
17 Mar 2012, 7:28 AM
Has Ext 4.1 RC1 resolved this for any of you? It hasn't helped here.

youss.imzourh
19 Mar 2012, 1:51 PM
Nope, it still not working. Damn it!
Hope on the next release!

westy
21 Mar 2012, 3:13 AM
Just to add to this, it seems that creating JSB3 files is broken in the 2.0.0 beta version of the SDK too.
That and it was horrendous to get working due to path issues or something.

To spell it out, again, without an updated, working, stable SDK it is impossible to move to 4.1!

dougi
22 Mar 2012, 2:10 AM
i have got the same errors with 4.1 RC1 on windows XP. The process never ends.
It's a major problem and for what i know it 's the same problem for macos and window users. So it's currently a dead end.

So i ask to the Sencha team. Can we expect the problem to be fixed with the final release.

It's really a bad timing because i'm trying to convince my boss to buy Extjs.

Thanks.

mitchellsimoens
22 Mar 2012, 4:09 AM
Slicer has been fixed for the next release! It just got fixed earlier this week so it should be good to go! The fix hasn't been merged in as it's going through what seems to be a rigorous QA process as we are ensuring we have pixel perfectness but it's at least creating the images now.

gav
22 Mar 2012, 4:12 AM
Exciting to hear, Mitchell! Is there a planned beta release for the next version of the SDK Tools that includes this fix, or just it's done when it's done?

mitchellsimoens
22 Mar 2012, 4:15 AM
Exciting to hear, Mitchell! Is there a planned beta release for the next version of the SDK Tools that includes this fix, or just it's done when it's done?

There isn't anything planned but if I were a betting man we would want it working for 4.1.0 GA that is support to come very soon.

dougi
22 Mar 2012, 4:38 AM
Good news!

zombeerose
3 Apr 2012, 8:35 AM
Any more news about the slicer? Is the next release of the SDK still dependent upon the Ext GA release?

mitchellsimoens
3 Apr 2012, 8:55 AM
I haven't tested it myself but there is a new SDK Tools version out. As I said, I have not tested and I haven't heard (haven't asked) if it is part of that release.

zombeerose
3 Apr 2012, 12:01 PM
So far my own tests with ExtJS 4.1 have not been favorable. No errors, no feedback, it just runs and exits with code 0.

I suspect it is not ready based on what Jacky mentions: "Please note that this release is only meant to be used with Sencha Touch SDK v2.0.1-RC (http://www.sencha.com/forum/showthread.php?192166-Sencha-Touch-2.0.1-RC-Now-Available) and later."

mitchellsimoens
3 Apr 2012, 12:09 PM
Ok, just got off a call with an engineering manager and I asked about slicer and what the status is.

So we just released SDK Tools 2 beta 2 but the slicer fix was not included in that. We just released Ext JS 4.1.0 RC2 (http://www.sencha.com/blog/ext-js-4-1-rc-2-released) a few minutes ago and GA will be the next release. Our goal is to have the SDK Tools 2 with slicer working when GA comes out in a few weeks. Currently we don't see any issues preventing this but of course you never know what will creep it's ugly head up.

zombeerose
3 Apr 2012, 2:14 PM
Ok - thank you for the update. Since our client base is primarily IE :((, the slicer is a requirement before we can deploy.

Off to play with RC2 ... :)

youss.imzourh
11 May 2012, 4:20 AM
That's working like a charm now with ExtJS 4.1.0 final and Sencha 2.0.0 Beta 3 !

Brilliant ! Thanks.