1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    14
    Vote Rating
    0
    badkneecap is on a distinguished road

      0  

    Default Running "Building your first Mobile App"

    Running "Building your first Mobile App"


    I downloaded Architect and started following along with the guide. I was having trouble getting it to run, so I resorted to downloading the completed project and trying to run it that way. I added my Yelp key and opened the app in Chrome. So far, everything seemed to be working as I was viewing some local restaurants. However, when I clicked on a restaurant, nothing happened. When I checked the console, it's showing an error trying to load the resource file http://localhost/sencha/CityBars/Cit...DetailPanel.js. When I checked my folders, I see that it's looking in "CityBars/CityBars/" when it should be looking in "CityBars/apps/" for that file. Did I set up something wrong?

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,919
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    what's appFolder set to? Should be the default app
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    14
    Vote Rating
    0
    badkneecap is on a distinguished road

      0  

    Default


    The AppFolder is set to "app".

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    14
    Vote Rating
    0
    badkneecap is on a distinguished road

      0  

    Default


    I stopped following the guide because I couldn't figure out one of the steps. I went back and was able to figure it out. When I previewed, I get the same error I got when I opened the downloaded project. So, I'm thinking I have something configured incorrectly.

    Before downloading Architect, I downloaded Touch 2 and put it in a folder named "sencha". Under that directory, I created "CityBars". Is it possible I have the wrong "version" of touch in the "sencha" dirctory? What files and directories should I have in there and where can I get them?

  5. #5
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,919
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Can you paste me the code (code view) for your DetailPanel here?

    Unlikely it's related to touch directory location. By default in settings the sdk path is pointed to cachefly url. Your welcome to change this to your locally download and hosted location if you'd like.

    Also be sure your running from a hosted location and not file:// though I suspect you wouldn't have gotten this far if you were.
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Jun 2009
    Location
    Redwood City, CA
    Posts
    197
    Vote Rating
    6
    CaliLuke is on a distinguished road

      0  

    Default


    Quote Originally Posted by badkneecap View Post
    I stopped following the guide because I couldn't figure out one of the steps. I went back and was able to figure it out.
    Which step? That would help me go and improve on the description.
    --
    Luca Candela
    twitter: @luckymethod

  7. #7
    Sencha User
    Join Date
    May 2012
    Posts
    14
    Vote Rating
    0
    badkneecap is on a distinguished road

      0  

    Default


    Quote Originally Posted by CaliLuke View Post
    Which step? That would help me go and improve on the description.
    http://docs.sencha.com/architect/2-0...rst_mobile_app

    I'm not sure why, but I didn't realize I could just click the "+" sign next to "init" in config.

  8. #8
    Sencha User
    Join Date
    May 2012
    Posts
    14
    Vote Rating
    0
    badkneecap is on a distinguished road

      0  

    Default


    Quote Originally Posted by Phil.Strong View Post
    Can you paste me the code (code view) for your DetailPanel here?

    Unlikely it's related to touch directory location. By default in settings the sdk path is pointed to cachefly url. Your welcome to change this to your locally download and hosted location if you'd like.

    Also be sure your running from a hosted location and not file:// though I suspect you wouldn't have gotten this far if you were.
    Code:
    Ext.define('MyApp.view.DetailPanel', {
        extend: 'Ext.tab.Panel',
        alias: 'widget.detailpanel',
        config: {
            tabBar: {
                docked: 'top',
                ui: 'light',
                layout: {
                    pack: 'center',
                    type: 'hbox'
                }
            },
            items: [
                {
                    xtype: 'container',
                    id: 'contact',
                    title: 'Contact',
                    items: [
                        {
                            xtype: 'container',
                            id: 'info',
                            padding: 10,
                            tpl: [
                                '<img class="photo" src="{photo_url}" width="100" height="100"/>;<h2>{name}</h2><div class="info">{address1}<br/><imm src="{rating_img_url_sall}"/></div>'
                            ],
                            layout: {
                                type: 'hbox'
                            },
                            items: [
                                {
                                    xtype: 'component',
                                    height: 100,
                                    id: 'photo',
                                    tpl: [
                                        '<img class="photo" src="{photo_url}" width="100" height="100"/>'
                                    ],
                                    width: 100
                                },
                                {
                                    xtype: 'component',
                                    id: 'data',
                                    padding: 10,
                                    tpl: [
                                        '<h2>{name}</h2><div class="info">{address1}<br/><img src="{rating_img_url_small}"/></div>'
                                    ]
                                }
                            ]
                        },
                        {
                            xtype: 'container',
                            id: 'MyContainer2',
                            layout: {
                                pack: 'center',
                                type: 'hbox'
                            },
                            items: [
                                {
                                    xtype: 'button',
                                    width: 100,
                                    text: 'Call'
                                },
                                {
                                    xtype: 'spacer',
                                    width: 57
                                },
                                {
                                    xtype: 'button',
                                    width: 100,
                                    text: 'More'
                                }
                            ]
                        }
                    ]
                },
                {
                    xtype: 'map',
                    id: 'detailMap',
                    title: 'Map'
                }
            ]
        }
    });
    I compared the code that I created to the downloaded project and they are identical. So, I still think it has something to do with the way my project is configured. I also tried using localhost/sencha/CityBars as well as localhost/CityBars. I also tried deploying to http://sencha/ and get the same errors.

    So, to try and get past the error, I created a virtual directory "citybars" that pointed to the "app" directory but it still didn't work. I got a new error: ""Cannot create an instance of unrecognized class name / alias: CityBars.view.DetailPanel"

    Thanks Phil!

  9. #9
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,919
    Vote Rating
    63
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    I'm noticing you didn't change your application name to CityBars

    select Application in inspector and change the name
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  10. #10
    Sencha User
    Join Date
    May 2012
    Posts
    14
    Vote Rating
    0
    badkneecap is on a distinguished road

      0  

    Default


    I changed the Application name from "MyApp" to "CityBars" and it stopped working altogether. Weird. I changed it back and I get the list of bars again, but it doesn't work when I click an individual bar. Still can't get this to work.