Results 1 to 3 of 3

Thread: Location of the touch directory

  1. #1
    Sencha User 12ftguru's Avatar
    Join Date
    May 2007
    Posts
    22
    Vote Rating
    1
      0  

    Default Location of the touch directory

    I have updated to the 3.0.0.250 of the Sencha Cmd tool and I was doing a few quick tests with Sencha Touch 2.1 and the Sencha Cmd tool. I used the generate app command as follows:

    Code:
    sencha -sdk-path /Applications/MAMP/htdocs/reusable/sencha-touch-2.1 generate app test /Applications/MAMP/htdocs/Test
    Unlike previous versions, it seems that this one generates the touch directory with all of the SDK files, in the parent directory of application itself. This means the app.js file is now looking for the Sencha Touch sdk in

    Code:
    Ext.Loader.setPath({
        'Ext': '../touch/src',
        'test': 'app'
    });
    Same for the index.html file. Unfortunately, in my case, my Apache development environment looks at the individual application directory as a root web folder and does not see any of the directories above it. So in the above example, I point my browser to http://test.dev to view the site. Since the touch directory is inaccessible to the site, it errors out.

    I know I can manually move things around, change file paths or even re-write my vhosts file to fix this. However, my questions are:

    1. What is the logic behind moving the SDK directory in the first place?
    2. Is there any way to override this in the command line itself?

  2. #2
    Sencha User 12ftguru's Avatar
    Join Date
    May 2007
    Posts
    22
    Vote Rating
    1
      1  

    Default Solution....

    So as it turns out, this was an error on my part (big surprise).

    When you generate a new application, there is a .sencha folder that gets created in the application directory (invisible from the OSX Finder). Sencha Cmd considers a directory containing this folder to be a workspace. This allows you to generate multiple apps within a single directory (good for complex multi-page sites). Each app generated into the workspace folder will share a single touch directory.

    A while back, I had accidentally generated a new application in my main code directory, instead of the target folder inside the the code directory. I didn't think much about it and just moved the folders into the directory I had originally intended to use.

    As you might guess, I totally missed the invisible .sencha folder. This made Sencha Cmd think I was inside a workspace and thus attempt to generate a shared touch directory in the main code directory.

    Big kudos to Peter and Don for their help with this. I would never have figured this out without them.

  3. #3
    Sencha User Trozdol's Avatar
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    64
    Vote Rating
    2
      0  

    Default

    Thanks for posting this! I wasn't sure if that was my problem for sure but after you told your story I remembered screwing up and generating an app my /user/ directory. I was finally able to generate a ST app with the touch folder in the app folder. Thanks!

Posting Permissions

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