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
Contributor
Posts: 34
Registered: ‎05-28-2011
My Device: Blackberry Playbook
My Carrier: O2

Error #2004 - blackberry.io.file.saveFile

The following code results in this error on PlayBook 1.0.7 OS. Any ideas what causes it and why? Also appropriate permissions are in config.xml under the widget element as shown below.

 

try
{

var dirs = blackberry.io.dir.appDirs;
var filePath = dirs.shared.documents.path + "/test.txt";


var fileBlob = blackberry.utils.stringToBlob("12345");
blackberry.io.file.saveFile(filePath,
fileBlob);
}
catch(ex)
{

window.alert(ex.message);

}

 

 

<rimSmiley Tongueermissions>
<rimSmiley Tongueermit>access_shared</rimSmiley Tongueermit>
</rimSmiley Tongueermissions>

Highlighted
Retired
Posts: 34
Registered: ‎10-24-2011
My Device: Curve
My Carrier: Telus

Re: Error #2004 - blackberry.io.file.saveFile

Make sure you have coresponidng entries for feature id (e.g blackberry.io.dir and blackberry.io.file) in your config.xml.

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Contributor
Posts: 34
Registered: ‎05-28-2011
My Device: Blackberry Playbook
My Carrier: O2

Re: Error #2004 - blackberry.io.file.saveFile

Sorry. They are already there. Forgot to mention.

Retired
Posts: 34
Registered: ‎10-24-2011
My Device: Curve
My Carrier: Telus

Re: Error #2004 - blackberry.io.file.saveFile

In that case I suspect you're using the old version of Tablet OS SDK, please download the recent version here.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Contributor
Posts: 34
Registered: ‎05-28-2011
My Device: Blackberry Playbook
My Carrier: O2

Re: Error #2004 - blackberry.io.file.saveFile

Nope, I am using 2.2.
Retired
Posts: 34
Registered: ‎10-24-2011
My Device: Curve
My Carrier: Telus

Re: Error #2004 - blackberry.io.file.saveFile

Your sample works for me, see if you have valid config.xml and archive structure, you can compare yours with This.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)