-
31 May 2012 8:51 AM #1
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?
-
31 May 2012 11:29 AM #2
what's appFolder set to? Should be the default app
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
-
31 May 2012 12:36 PM #3
-
1 Jun 2012 5:26 AM #4
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?
-
1 Jun 2012 9:07 AM #5
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
-
1 Jun 2012 9:33 AM #6
-
1 Jun 2012 9:52 AM #7
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.
-
1 Jun 2012 10:01 AM #8
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.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' } ] } });
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!
-
4 Jun 2012 9:20 PM #9
I'm noticing you didn't change your application name to CityBars
select Application in inspector and change the namePhil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
-
11 Jun 2012 8:55 AM #10
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.


Reply With Quote