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
Regular Contributor
superfly_fr
Posts: 55
Registered: ‎12-23-2011
My Device: 9900 / PB 2.0641
My Carrier: SFR
Accepted Solution

Ripple for BB10 (Chrome) acting weird.

[ Edited ]

Wether I try with my simple app (grid image list: 1 row, two images) or with bbui.js samples, Ripple rendering is really weird. Sometmes I can only display the background, sometimes the grid renders. No matter how often I hit the refresh button (or re-submit the URL) nor the fact that I clean the cache. I had some relative success by changing the top right buttons ("cross domain" & "theme" options), but this can't be a viable solution (and my alpha is bricked ... :smileyembarrassed:).

 

Config :

W7 ultimate up to date

Chrome 19.0.1084.56 m

Java JRE : Version 6 Update 31

Latest Webworks BB10 and Ripple (UI 0.9.6 / Build&deploy 0.9.5).
Oh : FRENCH locale (may this interfere ?), pages bellow are UTF-8 encoded.

 

Since it's also with original samples, I don't thing it's my simple app that's the cause ... but in case of ...

 

Config.xml

<?xml version="1.0" encoding="UTF-8"?>
	<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0.0" rim:header="MorfGPS">
	<name>MorfGPS</name>
	<description>GPS and utilities App</description>
	<content src="index.htm"/>
	<icon src="img/icon.png"/>

	<rim:loadingScreen backgroundImage="\img\background.png" onFirstLaunch="true">
		<rim:transitionEffect type="fadeIn" />
	</rim:loadingScreen>
	<rim:navigation mode="focus" />

	<feature id="blackberry.system.event" />
	<feature id="blackberry.app" />
	<feature id="blackberry.app.event" />
	<feature id="blackberry.ui.dialog" />
	<feature id="blackberry.ui.menu" />

</widget>

 index.htm

<!DOCTYPE html>
<html>
<head>
    <title>Golf de xxx</title>
    <meta id="viewport" name="viewport" content="user-scalable=no,width=device-width" />
    <link href="/css/bbui-0.9.2.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/js/bbui-0.9.2.js"></script>
	<script type="text/javascript">
		bb.init();
	</script>
</head>
<body onload="bb.pushScreen('home.htm', 'home');"></body>
</html>

 home.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<div data-bb-type="screen" data-bb-effect="fade">

	<div data-bb-type="grid-layout">
	    <div data-bb-type="group" data-bb-title="Parcours et jeu">
	        <div data-bb-type="row">
	            <div data-bb-type="item" data-bb-img="/img/list_GP.png" data-bb-title="Grand Parcours" data-bb-style="square"></div> 
	            <div data-bb-type="item" data-bb-img="/img/list_Val.png" data-bb-title="Valli&egrave;re" data-bb-style="square"></div> 
	        </div>
	    </div>
	</div>
</div>

 Also, running some inspection, I've noticed DIVs are hidden ... Would this mean Ripple can't detect the Alpha & WW 10 settings (wich are properlu set in the top left box) ?

 

Here's also what Ripple states in Chrome regarding the platform :

 

Version: 1.0.0.0
Platform: BlackBerry 10 WebWorks
Device: BlackBerry 10 Dev Alpha
OS: BlackBerry 10.0.4.178
Manufacturer: Research In Motion
Screen: 768x1280
Density: 355 PPI
Browser(s): Webkit
User Agent:
Mozilla/5.0 (BlackBerry) AppleWebKit/536.2+ (KHTML, like Gecko) Version/10.0.4.182 Mobile Safari/536.2+

 

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

Re: Ripple for BB10 (Chrome) acting weird.

What happens if you do an alert in your JavaScript for "navigator.userAgent"??

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Regular Contributor
superfly_fr
Posts: 55
Registered: ‎12-23-2011
My Device: 9900 / PB 2.0641
My Carrier: SFR

Re: Ripple for BB10 (Chrome) acting weird.

[ Edited ]

It prompts twice (put within the bbui-9.0.2.js script). First is my Windows theme alert style, second seems "neutral" and not "framed" within the alpha window).

 

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5

 

[BTW, for others, I'd suggest to use the following to allow easy copy : prompt('userAgent =',navigator.userAgent);]

 

Tim, sorry, but I must leave now ... it's 20:50 PM here, my daughter is staaaaaaarving :smileyhappy:

Please use plain text.
Regular Contributor
superfly_fr
Posts: 55
Registered: ‎12-23-2011
My Device: 9900 / PB 2.0641
My Carrier: SFR

Re: Ripple for BB10 (Chrome) acting weird.

[ Edited ]

Tim, can you remove a doubt ?
I can access any of my webserver project or am I due to use local filesystem + ripple-service ? (as in https://developer.blackberry.com/html5/documentation/ww_getting_started/accessing_a_local_project_in...

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

Re: Ripple for BB10 (Chrome) acting weird.


superfly_fr wrote:

Tim, can you remove a doubt ?
I can access any of my webserver project or am I due to use local filesystem + ripple-service ? (as in https://developer.blackberry.com/html5/documentation/ww_getting_started/accessing_a_local_project_in...



I'm not sure I understand your question??

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Regular Contributor
superfly_fr
Posts: 55
Registered: ‎12-23-2011
My Device: 9900 / PB 2.0641
My Carrier: SFR

Re: Ripple for BB10 (Chrome) acting weird.

[ Edited ]

Sorry. Can you confirm I can browse my app folder using Ripple/Chrome with a standard url as in http://my.devdomain.lan/myApp/index.html ? Or do I have to use the Ripple-sites folder like described in the linked article as in http://localhost:9910/myApp/index.html ?

The answer can be "both", and I presume it is ... but I prefer to ask.

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

Re: Ripple for BB10 (Chrome) acting weird.

The answer is both :smileyhappy:

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Regular Contributor
superfly_fr
Posts: 55
Registered: ‎12-23-2011
My Device: 9900 / PB 2.0641
My Carrier: SFR

Re: Ripple for BB10 (Chrome) acting weird.

[ Edited ]

Ok, thanks for the track Tim.
Once I saw the double alert, I figured that there might be iframes. There is !

 

So if you have same trouble: right click within the simulator screen and select "refresh FRAME".

Accuracy 100% for me. (then; script alert is "Mozilla/5.0 (BlackBerry) AppleWebKit/536.2+ (KHTML, like Gecko) Version/10.0.4.182 Mobile Safari/536.2+" i.e: the proper browser and - I presume - device detection).

 

Back to dev !

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

Re: Ripple for BB10 (Chrome) acting weird.

On windows if you press F5 it will refresh the frame.. on Mac if you use the keyboard refresh (don't know what it is off hand because I'm a windows guy) it will only refresh the frame as well.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.