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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha
My Carrier: Many :)

I found a bug with <img src=""> on the playbook

Hi all.

 

First and foremost, here's the HTML:

	<img class="HC_centered" id="login_logo" src="images/dir/tst.png"
		alt="" x-blackberry-focusable="false" />

 

Notice the src tag.  It's two directories deep - images/dir.  Now, this code does *not* work with my playbook running the new beta 2.1.0.560.

 

when i change the src tag to either

 

src="dir/tst.png"

 

or

 

src="tst.png"

 

or

 

src="local:///tst.png"

 

everything works.

 

However, images loaded via JS - specifically bbUI.js - work properly even when 2 direcotries deep.

 

example of working:

 

	<div id="app_row_1" data-bb-type="item"
			data-bb-img="images/component/icon1.png"
			data-bb-title="Input Controls" onclick="app_click(this.id);"
			data-bb-accent-text="Accent Text"
			data-bb-image-placeholder="images/component/placeholder.png">I
			have accent</div>

 this works, although, when i set the data-bb-img attribute to an image that i know is not there, the data-bb-image-placeholder does not work.

 

So, *sometimes* images that are 2 levels deep work with the playbook, sometimes they dont.

 

I DO NOT HAVE THIS ISSUE on bb 6 or 7 devices.

 

Thoughts / how to i file this as an official bug?


- - - - - - - - - -
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: I found a bug with <img src=""> on the playbook

Hi

I'm running 2.1 and have no problems with having image src 2 directories deep. (no bbUI, maybe its related?)

Did you try the remote inspector?

Nuno
Developer
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha
My Carrier: Many :)

Re: I found a bug with <img src=""> on the playbook

I have enabeled web inspector, and here;s the funny thing....

 

if you look at the resources tab, it lists the image just as it's supposed to.

here's the URL for the image that won't load

 

local:///images/icon/image.png

 

Now, that matches the folder structure perfectly.... so there is *something* preventing images that are two direcories deep from loading.  It may be BBUI related, as the html page that uses this image *is* loaded up through bbUI.html.

 

Here's the error that shows up in the console:

 

GET local:///images/icon/image.png Couldn't read a file:// file

 

 

but why does this happen *only* on the playbook?  i don't have this problem with BB devices...

- - - - - - - - - -
Regular Contributor
Posts: 81
Registered: ‎03-09-2012
My Device: PlayBook & Bold 9780
My Carrier: n/a

Re: I found a bug with <img src=""> on the playbook

It could be a "case" mismatch, e.g. the actual folder name is "Icon" with a capital I instead of "icon". Some file systems are case sensitive, others are not...
Developer
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha
My Carrier: Many :)

Re: I found a bug with <img src=""> on the playbook

i thought about that... i *tripple* checked.  File names match 100%.

- - - - - - - - - -
New Developer
Posts: 7
Registered: ‎03-02-2012
My Device: Storm 9530, Curve, Playbook
My Carrier: Airtel

Re: I found a bug with <img src=""> on the playbook

Hey, 
Atleast your <img> tag is working somehow. Can you help me, I have looked everywhere but couldnt find a solution.

In FLEX, I have a "lock.png" situated under the "src" folder. No complicated structure there.
Now using
Label.htmlText = "<img src="lock.png" />
I am unable to produce any results. Any hints what is wrong ?
(Tested on a simulator as well as on Playbook, using multiple combinations of "src/lock.png", "/lock.png", etc etc)

 

Highlighted
Developer
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha
My Carrier: Many :)

Re: I found a bug with <img src=""> on the playbook

Sorry i have not been focusing on Playbook application development as of late.

 

I would use web inspector to idenitfy *why* your image requests are failing.

 

You may not have the proper URI prefix (local:/ or file://).

 

Good luck! In thr future, though, for issues that are not directly related to the parrent post, please create a new thread Smiley Happy.

 

 

- - - - - - - - - -