1

I am new to Sencha Touch(a js framework for cross platform apps). While, learning sencha , I came across a strange problem, I searched out almost every where but couldn't find any.

Problem I declared a Model named "UserPass" using

Ext.define('MyApp.model.UserPass',{other params});

I connected that model to a store , added some values everything was working fine. Then for some reason , I changed the name of the model from "UserPass" to "User-Pass" i.e like.

Ext.define('MyApp.model.User-Pass',{other params});

It stopped working.

I tried to change the Model names more times using 'dash' and without dash. With 'UserPass', the code works fine but using 'User-Pass' the code stops working.

Is this a problem with the "dash" between "User" and "Pass" in the name of model? Or anything else that is not coming to my wit?

ishan
  • 28
  • 3

1 Answers1

0

It is not allowed in sencha simply. May be as using hyphens is deprecated/not allowed in variables in javascript.

See this link please . Parrots answer explains good. Javascript and CSS, using dashes

Community
  • 1
  • 1
Sarim Javaid Khan
  • 810
  • 15
  • 30