PDA

View Full Version : sencha commandline tool not working?



jochem kuun
2 Feb 2011, 1:13 AM
Hi,

In this video from sencha (http://vimeo.com/17705448), Tommy Maintz explains how to create a simple sencha app using MVC. At around 19 mins, he tells about the command line tool (sencha.sh) and how to use it.

I've tried it but I cant get the example app to work correct. It started with the references to includes in the index.html file: lib.touch/ext-touch-debug.js, where touch is the sencha package dir. i've changed this to lib/touch/sencha-touch-debug.js and as sencha package isnt automatically included, i copied it to the lib dir.

By doing the above, I've managed to fix the reference/include errors but I now get the following error:

Uncaught Error: Ext.List: itemTpl is a required configuration. on line 23116

I don't understand why it wont work, because the vid makes it look so easy.
Can anybody provide a way of generating the MVC files without errors, or provide me with a working package in a zip format or something?

I work on a mac using safari, chrome and sencha package (1.0.1a).

jochem kuun
2 Feb 2011, 2:20 AM
Nevermind, I figured out what was wrong:

in the file "app/views/Viewport.js" that is generated by the commandline tool a list is defined that uses tpl for assigning a template. But tpl is depricated and itemTpl should be used instead. So change this:

Ext.apply(this, {
dockedItems: [
{
...
tpl: '<tpl for="."><div class="link"><strong>{text}</strong></div></tpl>',
...

to this:

Ext.apply(this, {
dockedItems: [
{
...
itemTpl: '<tpl for="."><div class="link"><strong>{text}</strong></div></tpl>',
...

The above should fix the errors.

HTH