Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

deploying locally I get a "Cannot call method 'substring' of undefined" error #18

pherris opened this Issue Dec 20, 2012 · 14 comments


None yet
5 participants

pherris commented Dec 20, 2012

just deploying locally on windows, apache and using Chrome to view I get the above error. problem seems to originate from List.js

onItemAdd: function(item) {
var me = this,
config = item.config;

    if (config.scrollDock) {
        if (config.scrollDock == 'bottom') {
        } else {
        item.addCls(Ext.baseCSSPrefix + 'list-scrolldock-hidden');
        if (me.container) {
    } else {
        me.callParent(arguments); //<-- here

pherris commented Dec 20, 2012

ok, so I have to build the sample app to get it working sheepish grin. I'm new to the sdk. Trying this from the directory containing the app.js file

$ sencha -sdk /cygdrive/c/tools/sencha-touch-2.1.0-commercial/ app build -e testing

and getting this error:

Sencha Cmd v3.0.0.250
[ERR] Please ensure this command was executed from a valid application
[ERR] Unable to locate 'app.dir' config property from sencha.cfg

pherris commented Dec 20, 2012

I think I'm missing something. I'm getting stuck on this command:

To build the example you need to put Sencha Touch into a folder named sdk. Then run::

./sdk/commands/sencha app build -e testing

This will produce the example app in the build/testing directory.

The sencha touch 2.1 release does not have a directory called commands in it. There is a cmd dir with a sencha.cmd in it. Am I on the right path?


wnielson commented Dec 21, 2012

Sorry, the build directions are out of date. I'll post the updated instructions shortly.

@wnielson wnielson closed this in e2262d2 Dec 21, 2012

pherris commented Jan 2, 2013

Thanks, part of the problem was my confusion between the Cfg tools and the old Sencha Tools. Following the updated instructions it works fine with one exception, I had to match the case of my directory to my requires statement:

requires = [

instead of Ext.ux.SlideNavigation.


pherris commented Jan 2, 2013

wow, never mind - must have been me that capped the S and N. sorry - this is working great!


wnielson commented Jan 2, 2013

Great, glad its working!

Great job! But... How I can use the setActiveItem method from a button to change views?

My code:

xtype: 'button',
handler: function () {
console.log(menuContainer.getActiveItem()); // Works fine
menuContainer.setActiveItem(4); // Not working


never mind, I solved it :)

@eddiesigner for the sake of completeness, how did you solve it?

With this line:


lbernau commented Jan 31, 2013

"deploying locally I get a "Cannot call method 'substring' of undefined" error"

How did you fix this?
If I create a build version everything works fine, but just opening the folder throws this error.

pherris commented Jan 31, 2013

Sorry, I don't recall... are you seeing it in the same location? When I redeployed the example it did start working out of the box, but I was in the middle of a hackathon and as soon as I passed this point I moved onto the next thing. Maybe if you provide additional context I can help you?


wnielson commented Jan 31, 2013

Update and try again.

lbernau commented Feb 1, 2013

Works fine. Ty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment