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
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: File download problems

That looks like a bit of mine and a bit of summat else Smiley Happy

 

I notice there's no <access ... /> entry in config

 

Oh - the config in mine is using the wrong index if you ain't spotted it and tried compiling - the signed one is fine however




Click the like button if you find my posts useful!
Developer
Posts: 553
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: File download problems

peardox.

 

This was just a try with my  index to get rid of the "unknown"   "blackberry". So I borrowed your code for webworks ready. Attacking on 2 fronts :-)   I know yours needs jQuery but I do not know how to implement jQuery into the environment.

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: File download problems

The JQuery bits is just me being very lazy Smiley Happy

 

All the JQ stuff does is write to my output divs (#debug + #info)

 

You can kill every line with a $ on it - result - zero output and no JQuery in my stuff

 

if you change line 49 (in showImage) to something like...

 

document.getElementById('debug').innerHTML('<img src="' + b64 + '" /><br />\n');

 

it'll show the downoaded image stored as a Base64 URI in b64 and not all the junk I pump out right now




Click the like button if you find my posts useful!
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: File download problems

Oh - just spotted by you're probably getting undefined

 

BB10 needs...

 

<script src="local:///chrome/webworks.js" type="text/javascript"></script>

 

somewhere in the header on a device / sim (but not ripple or a PB)




Click the like button if you find my posts useful!
Developer
Posts: 553
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: File download problems

Running Chome and ripple.

 

Got

Uncaught TypeError: Cannot read property 'appDirs' of undefined

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: File download problems

config.xml

 

    <feature id="blackberry.io" />




Click the like button if you find my posts useful!
Developer
Posts: 553
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: File download problems

[ Edited ]

got these in config.xml:

 

    <feature id="blackberry.io" />
    <feature id="blackberry.system" />
    <feature id="blackberry.appDirs" />

 

gives

Cannot read property 'appDirs' of undefined

 

Removed      <feature id="blackberry.appDirs" />

 

same error

 

tried  <feature id="blackberry.io.dir.appDirs" />

 

no good either

 

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: File download problems

Ripple sucks (is broken)

 

Change onInitFs to...

 

function onInitFs(fs)
    {    
    fsys = fs;
    
    dodownload('flags/48x32/flags-united_kingdom.png');
    }

And it'll work - the fullPath reference was a few lines later)

 

Compile and install on Simulator and it'll work WITH the fullPath as that has half decent BB10 API support

 




Click the like button if you find my posts useful!
Developer
Posts: 553
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: File download problems

stumbles here:

 

function startapp()
{
if(pb)
{
dirs = blackberry.io.dir.appDirs;
 
Uncaught TypeError: Cannot read property 'appDirs' of undefined
 
I wonder what the heck I have gotten myself into. Endless hours struggling with a complex development
environment that seems to be in an alpha state
If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: File download problems

Though I'd git rid of that

 

Just add

 

pb = false;

 

somewhere - it'll then fall over later on cos of Ripple




Click the like button if you find my posts useful!