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
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
Accepted Solution

BBUI BB10 error?

[ Edited ]

Im building an app and I keep gettting this problem half white screen along the navigation buttons.  Am I putting a div in the wrong place?Hiiterror1.png

 

 

 

 

 

Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: BBUI BB10 error?

Here is a better picture. It seems that I do not have a div in the wrong spot. Some something is being weird.

 

Hiiterror1.png

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BBUI BB10 error?

Do you have any errors in the Web Inspector? How do you initialize bbUI.js and which version do you use? My index.html header looks like below and haven't got your issue, maybe something is missing for you:

 

function bbUI() {
	/* do: add the bbui.ini(..) stuff here*/
}
			
			
function WWready() {
	console.log("WebWorks APIs are now available");
	document.removeEventListener("webworksready", WWready);
	
	/* do: set up bbUI.js and add first screen */
	bbUI();
}

function DOMready() {
	console.log("DOM & Content are now available");
	window.removeEventListener("load", DOMready, false);
	/* do: wait until WebWorks is ready */
	document.addEventListener("webworksready", WWready);
}

window.addEventListener("load", DOMready, false);

 

 

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
nathanpc
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha

Re: BBUI BB10 error?

Where you want that div to be? Because bbUI.js puts the ActionBar using this CSS:

position="fixed";
bottom: 0;

 Which makes it "float" at the bottom of any screen.

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: BBUI BB10 error?

[ Edited ]

well to be honest i have no idea whats goign on. i can show some of my code on here.

 

<!-- timerstuff--><head>

<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=no,target-densitydpi=device-dpi" />
    
    <link href="css/bootstraper.css" rel="stylesheet">
    
    <link href="css/default.css" rel="stylesheet">
    
    <script src="js/jquery-1.7.1.min.js"></script>
    
    <script src="js/hiit-timer.js"></script>
    <script src="js/buzzer.js"></script>

</head>



<div data-bb-type="screen" data-bb-effect="fade" data-bb-scroll-effect="off">
			

    <div class="container">
    
        <header class="page-header">
      
</header>

<div id="settings-fields" class="form-inline well">             //*my timer stuff </div> <div id="countdown-area"> //*my timer stuff </div> <!--endtimerstuff--> <!--nav start--> <div data-bb-type="action-bar" data-bb-tab-style="highlight"> <div data-bb-type="action" data-bb-style="tab" data-bb-img="images/about.png" onclick="bb.pushScreen('about.html', 'about');">About</div> <div data-bb-type="action" data-bb-style="tab" data-bb-img="images/exit.png" onclick="blackberry.app.exit()">Exit</div> </div> </div> <!--nav end-->

 

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BBUI BB10 error?

Is this a screen you are adding using the bb.pushScreen method or is this your main screen? In both you need to fix your source code since:

 

  1. If it is a screen you push: there is no need for <head> and <meta> elements
  2. In both situations: there is no <header> element as far as I know

Try to clean/fix your source, I think it should work then.

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: BBUI BB10 error?

This is my main screen. im adding a bbui button to take me to another screen
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: BBUI BB10 error?

[ Edited ]

but this isnt my .index page

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BBUI BB10 error?

Have a closer look at the bbUI.js samples from the latest next branch (v0.9.4) and how it is structured. If this is your main/index the bbui-initialization is missing (bb.init(...)) and the after your closing </head> element there should be an empty <body></body>. The first screen then should be added just after you initialized the bbUI object.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BBUI BB10 error?

Since it isn't your index remove the header and add all the <script> tags to the div container of your screen. The Action-Bar example adds <script> tags just below the <div> of bb-type="screen".


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.