Results 1 to 3 of 3

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

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Buenos Aires
    Posts
    17
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,412
    Answers
    3898
    Vote Rating
    1288
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •