1. #1
    Sencha User biggbest's Avatar
    Join Date
    Jun 2011
    Location
    France
    Posts
    38
    Vote Rating
    5
    biggbest is on a distinguished road

      0  

    Question First Look - Got 2 warnings errors

    First Look - Got 2 warnings errors


    Hi,

    I've just downloaded the Sencha Designer Beta, made the First Look app, but I got 2 warnings :

    [Ext.Loader] Synchronously loading 'CityBars.view.Viewport'; consider adding Ext.require('CityBars.view.Viewport') above Ext.onReady sencha-touch-all-debug.js:6292

    Ressource interprétée comme Script mais transférée avec un type MIME text/plain. business_review_search:-1

    Is someone already got these errors ? :-(

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,304
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    These are both warnings that can safely be ignored. The first one, the designer should be adding an additional require. We will fix that.

    THe second one is because Yelp didnt set their mime type as javascript when transferring data over JSONP.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User biggbest's Avatar
    Join Date
    Jun 2011
    Location
    France
    Posts
    38
    Vote Rating
    5
    biggbest is on a distinguished road

      0  

    Default


    Oh well ok, but the fact is that nothing appear on the screen, except the title (and gray background).

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,304
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Do you have an initial view set?

    Would you post the project you are having problems with?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    hazelize is on a distinguished road

      0  

    Default Same problem

    Same problem


    In testing within the browser the citybars application, the package I downloaded from you guys, it just shows a gray background, citybars as the title, and it retrieves my location, but nothing else happens.

    Actually, I get these errors on top of those warnings...

    XMLHttpRequest cannot load file:///...citybars/app/view/Viewport.js?_dc=1328821478827. Cross origin requests are only supported for HTTP.

    sencha-touch-all-debug.js:7826
    Uncaught Error: [Ext.Loader] Failed loading synchronously via XHR: 'app/view/Viewport.js'; It's likely that the file is either being loaded from a different domain or from the local file system whereby cross origin requests are not allowed due to security reasons. Use asynchronous loading with Ext.require instead.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    hazelize is on a distinguished road

      0  

    Default


    Fixed it. I guess my local file system doesn't allow the AJAX due to security reasons like the error said, so I uploaded it to our server and tested it online and it works fine

  7. #7
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,304
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by hazelize View Post
    Fixed it. I guess my local file system doesn't allow the AJAX due to security reasons like the error said, so I uploaded it to our server and tested it online and it works fine
    That is correct, you need to run this via the http protocol.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  8. #8
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,911
    Vote Rating
    62
    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


    Also be sure to update the getBusinesses function in your Business Controller to include your own yelp api key
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  9. #9
    Touch Premium Member
    Join Date
    Dec 2010
    Location
    Jakarta, Indonesia
    Posts
    49
    Vote Rating
    0
    trinitrotoluen is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    That is correct, you need to run this via the http protocol.
    I'm facing this issue too when I opened the file directly (not via webserver). The problem is I want my app working when I'm using it with phonegap framework ? How to manage this problem because I have no problem with ST 1.x ?

  10. #10
    Touch Premium Member
    Join Date
    Dec 2010
    Location
    Jakarta, Indonesia
    Posts
    49
    Vote Rating
    0
    trinitrotoluen is on a distinguished road

      0  

    Default


    just found it , I have to use 'requires' to include the component
    requires: [
    'Ext.form.Panel','Ext.form.FieldSet','Ext.field.Password'
    ]