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
dtater
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?


- - - - - - - - - -
Please use plain text.
Developer
nunodonato
Posts: 313
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
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Please use plain text.
Developer
dtater
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...

- - - - - - - - - -
Please use plain text.
Regular Contributor
BertKoor
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...
Please use plain text.
Developer
dtater
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%.

- - - - - - - - - -
Please use plain text.
New Developer
utkarshj
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)

 

Please use plain text.
Developer
dtater
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 :smileyhappy:.

 

 

- - - - - - - - - -
Please use plain text.