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
Contributor
Drentz
Posts: 13
Registered: ‎05-10-2011
My Device: Blackberry 9550
Accepted Solution

HELP or Advice please

I am attempting to work on an app for BB10 running on the Dev Alpha Simulator. When ran through the simulator I see the app icon in the app tray, but when upon loading i don't get the grid list I coded for the only thing that shows is a white screen. I have posted my code so someone can help me figure out where I went wrong. I have the bbui-0.9.3 css and JS files and the webworks-1.0.1.5 JS files included in  my packaged folder.

 

index file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html> 
	<head>
		<meta name="x-blackberry-defaultHoverEffect" content="false" />
		<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=no,target-densitydpi=device-dpi" />
		<link  rel="stylesheet" type="text/css" href="bbui-0.9.3.css"><link />
		<script type="text/javascript" src="bbui-0.9.3.js"></script>
		<script type="text/javascript">
			bb.init();
		</script>
	</head>
	<body onload="bb.pushScreen('home.htm', 'home');">	
	</body>
</html>

 

Home file:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<div data-bb-type="screen" data-bb-effect="fade">
	<style type="text/css">
		.myclass {
				background-image:url
		}
	</style>
		<div style="height:175px; width:550px; margin: 0px auto 0px auto;">
		<h1 style="height:12%; text-align:center; padding-top:3%;"> Assignment Assistant</h1>
		</div>
		
					<h2>Please choose a class below</h2>
			
		<div data-bb-type="grid-layout" data-bb-header-justify="left" data-bb-header-style="solid">
      <div data-bb-type="group" data-bb-title="My Title">
          <div data-bb-type="row">
              <div data-bb-type="item" data-bb-img="nametag.png" data-bb-title="Splash">Please choose a class below</div>
          </div>
		  </div>
		  <div data-bb-type="group" data-bb-title="Your Core Four">
          <div data-bb-type="row">
              <div data-bb-type="item" data-bb-img="ela.png" data-bb-title="ela" onclick="bb.pushScreen('english.htm', 'english');">Writing and literature</div> 
              <div data-bb-type="item" data-bb-img="math.png" data-bb-title="math" onclick="bb.pushScreen('math.htm', 'math');">Solving equations</div>
			  <div data-bb-type="item" data-bb-img="sci.png" data-bb-title="science" onclick="bb.pushScreen('science.htm', 'science');">Inquiry based studies</div>
			  <div data-bb-type="item" data-bb-img="history.png" data-bb-title="history" onclick="bb.pushScreen('history.htm', 'history');">Civilizations past to present</div>
          </div>
      </div>
	  <div data-bb-type="group" data-bb-title="Personal Endevores">
          <div data-bb-type="row">
              <div data-bb-type="item" data-bb-img="foreign.png" data-bb-title="foreign" onclick="bb.pushScreen ('foreign.htm', 'foreign');">Spoken around the world</div>		
              <div data-bb-type="item" data-bb-img="elective1.png" data-bb-title="elective1" onclick="bb.pushScreen ('elective1.htm', 'elective1');">Special interests</div> 
              <div data-bb-type="item" data-bb-img="elective2.png" data-bb-title="elective2" onclick="bb.pushScreen ('elective2.htm', 'elective2');">Special interests</div>
          </div>
      </div>
  </div>
</div>

 

Config File:

 

<?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" id="AssignmentApp">  
    <name>Assignment Assistant</name>
    <author>D. Rentz</author>
    <description>quick copy and retrive Homework Assignments</description>
    <icon src="images/nametag.png"/>
    <content src="index.html"/>
       
</widget>

 Any help to get this figured out would be a great help, so I can move on to the next stage. Thanks in advanced for taking your time to help.

Developer
Hithredin
Posts: 405
Registered: ‎06-03-2010
My Device: Z10 Red

Re: HELP or Advice please

Install google's chrome web browser and go to the url:

http://169.254.0.1:1337/

 

With the IP being your simulator's IP

 

 

You'll be then able to see what HTML has really been loaded by Webworks

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

Re: HELP or Advice please

Using Ripple for BB10 in Chrome browser for me it looks like this:

 

post_thread_20120813.jpg

 

Since all the images are missing they aren't shown in the page.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
Drentz
Posts: 13
Registered: ‎05-10-2011
My Device: Blackberry 9550

Re: HELP or Advice please

[ Edited ]

Yeah i kind of figured that with the image files not available, for someone else to run it would be difficult to see the outcome. To be clear the images are included in my image folder when the app is packaged.

 

 (I dont see the image you posted. all i see is a faded yellow triangle with a thick rounded boarder).

 

  When i run the home.html in Ripple for BB10 in Chrome I see the words listed on a white screen without the images and not in a grid configuration.

I was thinking that there was something wrong with my code.

Contributor
Drentz
Posts: 13
Registered: ‎05-10-2011
My Device: Blackberry 9550

Re: HELP or Advice please

Can anyone check this out. Is it possible that my index file is loading but not pushing to my Home.html page? if so what can i do to push to my home.html page.

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

Re: HELP or Advice please


Drentz wrote:

Can anyone check this out. Is it possible that my index file is loading but not pushing to my Home.html page? if so what can i do to push to my home.html page.


You are pushing a home.htm, not home.html like shown in your source above:

 

..
<body onload="bb.pushScreen('home.htm', 'home');">
..

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
Drentz
Posts: 13
Registered: ‎05-10-2011
My Device: Blackberry 9550

Re: HELP or Advice please

Holy Cow. Something so simple made the differance. I can finally see what i've worked on. Now i have to rework something else because i see my grid-list (finally) but my images arent showing properly. i see the little bluebox with a "?".

Thanks LBP

 

Now off to the documentation to see if theres a preferred image size for grid-list images.

Developer
Hithredin
Posts: 405
Registered: ‎06-03-2010
My Device: Z10 Red

Re: HELP or Advice please

[ Edited ]
 
Contributor
Drentz
Posts: 13
Registered: ‎05-10-2011
My Device: Blackberry 9550

Re: HELP or Advice please

Yes i am using the real simulator on vmWare.

 

Just throwing it out there to anyone... is a preffered image size for grid-list images?

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

Re: HELP or Advice please


Drentz wrote:

Yes i am using the real simulator on vmWare.

 

Just throwing it out there to anyone... is a preffered image size for grid-list images?


Prefered size is in the Wiki for bbUI.js I thought? Have a closer look to it again :smileywink:: https://github.com/blackberry/bbUI.js/wiki/Image-List


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