PDA

View Full Version : [FIXED] Multiple problems using a theme



GSandoval-Greentree
6 May 2015, 8:29 PM
Starting from scratch:


Create a workspace and classic app.
Generate a theme for the new app.
Update app.json to use the new theme.
Build the app

Build will fail with:


[INF] Processing Build Descriptor : default
[ERR] Cannot satisfy requirements for "${args.theme.extend.name}"!
[ERR] The following versions cannot be satisfied:
[ERR] MyTheme: ${args.theme.extend.name} (No matches!)
[ERR] Cannot resolve package requirements


Easy to solve, open package.json and give it a theme to extend from. Put in "ext-theme-classic". Build the app again. This time I get:


Sencha Cmd v6.0.0.92
[INF] Processing Build Descriptor : default
[INF] Starting server on port : 1841
[INF] Mapping http://localhost:1841/~cmd to D:\Programs\Sencha\Cmd\6.0.0.92...
[INF] Mapping http://localhost:1841/ to D:\Projects\Sencha6App...
[INF] Application available at http://localhost:1841
[INF] Loading app json manifest...
[INF] Appending content to D:\Projects\Sencha6App\myApp\bootstrap.js
[INF] Writing content to D:\Projects\Sencha6App\myApp\bootstrap.json
[INF] Compressing data with YuiJavascriptCompressor
[INF] Writing concatenated output to file D:\Projects\Sencha6App\build\production\MyApp\app.js
[INF] merging 256 input resources into D:\Projects\Sencha6App\build\production\MyApp\resources
[INF] merged 0 resources into D:\Projects\Sencha6App\build\production\MyApp\resources
[INF] merging 10 input resources into D:\Projects\Sencha6App\build\production\MyApp
[INF] merged 0 resources into D:\Projects\Sencha6App\build\production\MyApp
[INF] Writing content to D:\Projects\Sencha6App\myApp\sass\example\bootstrap.json
[INF] Writing content to D:\Projects\Sencha6App\myApp\sass\example\bootstrap.js
[INF] writing sass content to D:\Projects\Sencha6App\build\temp\production\MyApp\slicer-temp\MyApp-example.scss.tmp
loading page http://localhost:1841/myApp/sass/example/fashion.html?phantomjs=true
Loading sass builder...
registering ready listener...
successfully loaded page http://localhost:1841/myApp/sass/example/fashion.html?phantomjs=true
loading phantomjs adapter
processing update type : BuildSassFile
building scss file ..\..\..\build\temp\production\MyApp\slicer-temp\MyApp-example.scss
scss build error for ..\..\..\build\temp\production\MyApp\slicer-temp\MyApp-example.scss
Error: Undefined variable : $grid-row-cell-over-background-color
Error: Undefined variable : $grid-row-cell-over-background-color
saving generated css
loading generated css
using base hfref : http://localhost:1841/build/temp/production/MyApp/slicer-temp/
css build complete
loading widget definitions...
rendering widgets...
processing update type : CaptureWidgetManifest
saving image file to D:\Projects\Sencha6App/build/temp/production/MyApp/slicer-temp/theme-capture.png
Saving slicer page image to D:\Projects\Sencha6App/build/temp/production/MyApp/slicer-temp/theme-capture.png
saving widget data to D:\Projects\Sencha6App/build/temp/production/MyApp/slicer-temp/theme-capture.json
Saving slicer widget manifest to D:\Projects\Sencha6App/build/temp/production/MyApp/slicer-temp/theme-capture.json
[INF] Slicing images...
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR] at com.sencha.cli.Commands.dispatch(Commands.ja
[ERR] va:64)
[ERR]
[ERR] Total time: 38 seconds

[ERR] The following error occurred while executing this line:
D:\Projects\Sencha6App\myApp\.sencha\app\build-impl.xml:335: The following error occurred while executing this line:
D:\Projects\Sencha6App\myApp\.sencha\app\slice-impl.xml:370: The following error occurred while executing this line:
D:\Projects\Sencha6App\myApp\.sencha\app\slice-impl.xml:371: The following error occurred while executing this line:
D:\Projects\Sencha6App\myApp\.sencha\app\slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space


Ignoring the first error, looks like something bad happened during slicing. I turn it off in the apps sencha.cfg. This now builds, but I still get the error "Undefined variable : $grid-row-cell-over-background-color".

The generated css file is empty. I used the example code from here to add some custom css: http://docs.sencha.com/extjs/5.1/core_concepts/theming.html#Creating_Custom_Component_UIs

Here is the app I created minus the contents of the ext folder.
https://www.dropbox.com/s/dqzfg5x3euhfi9y/Sencha6App.zip?dl=0

I'm using java version "1.8.0_25"

GSandoval-Greentree
7 May 2015, 12:27 PM
Also,

Go into the theme directory and type 'sencha package build'.
This gives:


Sencha Cmd v6.0.0.92
[INF] Processing Build Descriptor : default
[ERR] Cannot satisfy requirements for "theme-classic"!
[ERR] The following versions cannot be satisfied:
[ERR] mytheme: theme-classic (No matches!)
[ERR] Cannot resolve package requirements

Adding "toolkit": "classic" to the themes package.json removes that error. This still does not change the problem I mentioned above. It will still generate an empty css file.

dongryphon
26 May 2015, 10:26 PM
The problem with the generator leaving "${args.theme.extend.name}" has been fixed (SDKTOOLS-1116).

There is a problem (not yet fixed) using the alternate names ("ext-theme-foo" instead of "theme-foo") that causes scss files to be included in the wrong order. Maybe that is what you are seeing there?

I will download the zip and see what I see using the latest bits.

dongryphon
26 May 2015, 10:50 PM
I downloaded the app and tested it with the soon to be released beta builds (using "extend": "theme-classic") and it all seems to be working now. I can build the theme (if I add "toolkit": "classic" to it) and the app.

Eric Dykstra
3 Aug 2015, 3:43 AM
There is a problem (not yet fixed) using the alternate names ("ext-theme-foo" instead of "theme-foo") that causes scss files to be included in the wrong order.

Don,

Could you please let us know if this bug has been resolved and in what release? If it has not been resolved, could you please provide the bug number so we can track it? As well, if you could confirm that simply executing 'sencha app build' twice is a valid work-around, that would be great.

Thanks!