1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Buenos Aires
    Posts
    17
    Vote Rating
    0
    nguerin is on a distinguished road

      0  

    Default Unanswered: Where does the app name that sencha sdk-tools uses to generate files come from?

    Unanswered: Where does the app name that sencha sdk-tools uses to generate files come from?


    Love the SDK tools. I just used them to create a new model:

    Code:
    sencha generate model --name=BusinessObject --fields=data:string,key:string,name:string,status:int,timestamp:string
    The only problem was that the prefix that it choose to use for the class was not the prefix that the rest of my app uses. It called the new model:

    Code:
    'Phonegap.model.BusinessObject'
    while my app.js has this as the application name:
    Code:
    Ext.application({	name: 'Cortana',
    	requires: [
    		'Ext.MessageBox',
    	    'Cortana.manager.Login',
    		'Cortana.manager.EnvironmentResolver',
    	    'Cortana.manager.UrlResolver'
    	] ...
    Where do the sdk-tools get the app name from? I'd like to change it so it generates the correct model name (Cortana) the next time. Thanks!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,015
    Answers
    3491
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Using the new Sencha Cmd, when you generate the app:

    Code:
    sencha generate app MyApp /path/to/MyApp
    It will use MyApp as the name. To change it you have to go through all the app classes in the app dir but also in the build.xml file the project node you will see the name attrib that you would have to change also. app.json also would need changed.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Location
    Buenos Aires
    Posts
    17
    Vote Rating
    0
    nguerin is on a distinguished road

      0  

    Default


    Cool, thanks for the info. I was using the Sencha 2.0 SDK, not the new cmd. But hopefully we'll be able to update the project to 2.1 soon so we can use the cmd.

Thread Participants: 1

Tags for this Thread