Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100
Accepted Solution

Ripple Simulation

I am trying to simulate some basic app in Ripple, but I can't do it. I have tried with serveral blackberry samples and I always get the image attached.

 

 

What am I doing wrong?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Ripple Simulation

Is the URL you are using based on file:/// or on http:// ?

 

Chrome won't run JavaScript on file:// based protocols.  If you place the sample on a local web server it should run in Ripple.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Ripple Simulation

I use file://

 

But i did this.... 

 

"Running Ripple without a local web server

 

Ripple, by default, is configured to allow you to test mobile HTML5 applications that are hosted on a local or remote web server. However, that might not always be ideal and you might find yourself needing to test applications that reside on you local file system. Here are the steps you’ll need to follow to enable Ripple to test applications that are hosted on your local file system:

 

1. You will need to start the Chrome browser with the following command line flag: 

         --allow-file-access-from-files

 

2. Once that is done, you’ll need to visit the following URL in Chrome: chrome://extensions/, locate the Ripple extension in the list and make sure the “Allow access to file URLs” checkbox is checked. "

 

So I'll give it a try with a local server...



Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: Ripple Simulation

You should get more info in the console. It could be due to some XHR requests you're making.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
BlackBerry Development Advisor (Retired)
brentlintner
Posts: 5
Registered: ‎07-12-2011
My Device: Required Field

Re: Ripple Simulation

Did you by any chance see any JavaScript errors in the console (that interfaSys mentioned)? XHR is the biggest issue in file://. :-s "Ctrl + Shift + I" should bring up the error console in Windows (I believe).

 

If it helps, you can also disable the proxy Ripple uses, and then disable web security in Chrome and essentially have a "wide open" XMLHttpRequest object that acts more like it does on a mobile app platform (ex PhoneGap, WebWorks etc).

 

If you are interested in that, see this forum post about it (as of yet it is not mentioned on rippledocs.tinyhippos.com).

 

http://ripple.tinyhippos.com/forums/3-ripple/topics/36-disabling-web-security-in-chrome-for-cross-do...

 

Cheers,

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Ripple Simulation

This is the error I am getting in the console...

 

XMLHttpRequest cannot load file:///C:/Users/workspace/WidgetSample/config.xml. Cross origin requests are only supported for HTTP.

 

I am new in this technology so I'll try to figure out..

Please use plain text.
BlackBerry Development Advisor (Retired)
brentlintner
Posts: 5
Registered: ‎07-12-2011
My Device: Required Field

Re: Ripple Simulation

That is a weird error. Typically the request to config.xml should be local. You pointed out you ran Chrome with the --allow-file-access-from-files flag. What OS are you on? My thought is, I know at least for me (on Linux) unless I start Chrome up with a new user profile as well, the flag may not get applied if there are any existing instances of Chrome open.

 

Could that be it? If not, let me know!

 

Best Regards,

Please use plain text.