Problem writing files in the shared documents directory.

Hello

I'm new in the development of the PlayBook. I am trying to create an application that can save image file within the shared documents directory (so another image viewer application can find). Here is my code:

var file:File = File.documentsDirectory;
/////////////////////////
Try to write a file...
var jpgEncoder:JPEGEncoder = new JPEGEncoder();
var jpgData:ByteArray = jpgEncoder.encode (bmp);
file.addEventListener (Event.COMPLETE, onFile_SaveComplete);
leader. Save (jpgData, filename);

I got a file save dialog box when I call «file.save (...)» However, once I typed in the name of the file to save and press the 'OK' button, I got the exception like below:

Error #2044: Unhandle IOErrorEvent:. Text = Error #2038: file IO error.

to flash.filesystem::File$/getFile()

to flash.filesystem::File$/get_documentsDirectory()

.....

.....

The same code run perfectly on my desktop, so I wonder if there is some other restriction in OS PlayBook to stop me from saving the file in the shared document directory? So, should I sign my application with certificate?

[I read the document and understand that 'File.documentsDirectory' must be writable...] May I have I'm misunderstanding... ? ]

Best Rergards,

Hey,.

Welcome to the forums! This has just been discussed in a previous thread of yesterday. Basically, file navigation dialog boxes are unfinished and lead erros weird whenever you try to use a method that requires a browse dialog box. work around right now must use the FileStream class to write your files on the hard disk of the playbook, until all the dialogues are fixed on the platform.

Here is the link to the previous thread. inside, you will find the work around the code that you can adapt to your needs. also, there is a little more explanation:

http://supportforums.BlackBerry.com/T5/Tablet-OS-SDK-for-Adobe-Air/saving-syntax-incorrect/m-p/78610...

hope that helps. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • CANNOT write to files in the shared folder of XP on a PC running windows 7 - but good vice versa

    I have a laptop under Windows 7 (SP1) and a desktop running XP (SP3).  I have connected both via a wireless network. While I can see and access shared files/folders from one computer to the other computer, I can only read/write files in the shared folder on the portable computer that is running Windows 7.

    If I try and change a file in the shared folder from the PC under XP on my laptop, I get the message "this file is set to read-only. Try again with a different name "."  I know that the file is NOT checked for read-only. When I change the name of the file I get the error message "\\Desktop\SharedDocs\filename.doc you are not allowed to save in this location. Contact the administrator for approval.  You want to save in the folder my documents instead? "If I save the file to another location on the laptop under Win7 it save then OK.  I can not just save a modified version of the file in the same shared folder from desktop running XP.
    It seems that it must be something to do with permissions and access to the parameters of the desktop running XP but I can not find these. Fairly easy to find in Windows 7.
    Finally, I don't have a login/password set for the connection to the computer to Office XP.  I don't have a user name and password for the laptop Win7 but you have turned off password protected sharing.
    Anyone have a solution to this?
    Thank you

    OK - the problem is now resolved.

    I noticed that the read-only for the shared folder has been checked. When I unchecked it and also checked the box "allow network users to change my files" in the shared folder properties/sharing, I was able to modify and save files in the shared folder on my laptop.
    It's a little weird because I thought I had done this the other day where the results have been less successful.  Strange.
    Thanks for your help.

  • CS6 Crash inDesign on placing a file on the indesign document, Crash report is attached.

    Hello

    InDesign CS 6 works very well for Mac mini in MacBookPro it always crash on placing a file on the InDesign Document.

    Crash report: http://pastebin.com/fUPiYd0c

    I tried:

    (1) to uninstall and reinstall CS 6

    (2) using different accounts including admin

    Troubleshooting 3) as following:

    ' a) Trash preferences (cmd-opt-shift-control keys for InDesign starting).

    Corrupt preferences (see above), or maybe the permissions on the folders that contain the preferences are such that InDesign cannot write correctly for them. (it sometimes happen).

    (b) by deleting sub folders: before you remove the sub directories/files, please make a backup (just to the trunk).  Exit design and try to delete the following files/directories (InDesign recreates them initially to the top):

    ~/Library/application support/Adobe/Adobe InDesign CS5.5

    InDesign ~/library/caches/Adobe

    ~/Library/Caches/com.Adobe.InDesign

    InDesign ~/Library/preferences/Adobe

    ~/Library/preferences/com.Adobe.InDesign.plist

    ~/Library/preferences/com.Adobe.InDesign.plist.lockfile

    ~/Library/saved application State/com.adobe.InDesign.savedState

    Note: The user library directory hides under MacPro/Lion. You can get there in the Finder by pressing Option and then go to the menu (other ways are too thin).

    Please let me know if I'm missing something.

    Thanks in advance,

    It hangs in the plugin simple catalog...

  • User should not be able to remove all the files in the shared folder

    Hi all

    I have a shared folder accessible to each user Department wise, now I don't want to leave one to delete all files in the shared folder

    Shared folder is created on the Server Windows server 2008

    Please suggest emergency

    --
    Kind regards
    Kalpesh

    Hello

     
    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.
     
     
    I hope this helps.
  • I get error: "the file or the C:\$Secure directory is corrupted and unreadable" after running chkdsk.

    I ran chkdsk utility and he stopped to say that I had a hard drive error or something like that. so I cancelled it. now I get all these things popping up that says ' the file or the C:\$Secure directory is corrupted and unreadable please run the chkdsk utility.» My question is if I run it again and it stops I have to do? I also need to know why I get the installer of windows popping up for office 2003, when I already have? I tried to reinstall with a drive, but my computer won't let me?

    original title: chkdsk utility
    original title: I ran chkdsk utility and he stopped to say that I had a hard drive error.

    I ran chkdsk utility and he stopped to say that I had a hard drive error or something like that. so I cancelled it. now I get all these things popping up that says ' the file or the C:\$Secure directory is corrupted and unreadable please run the chkdsk utility.» My question is if I run it again and it stops I have to do? I also need to know why I get the installer of windows popping up for office 2003, when I already have? I tried to reinstall with a drive, but my computer won't let me?

    What you need to do before anything else, it's everything and nothing important to you and to the stability of the machine (your ability to rebuild from scratch) backup because chances are - you will be rebuilding this computer from scratch and everything on this hard drive will be erased.

  • I can see other computers on a network of peer to peer windows XP but cannot access their shared files and the shared printer.

    I can see other computers on a network of peer to peer windows XP but cannot access their shared files and the shared printer. The computers are connected by a switch, fixed IP addresses that are correctly configured and point to a DNS server outside the network. When I try to open the icon for one of the computers, he asked for credentials. I try to type the user name for the computer that is sharing the resource and the password. It is the user account whose computer is loged on and belongs to the Administrators group. for example: user name (Computer1\username) password (password). It does not work. The Windows Firewall is disabled on all computers. It worked well there 2 days. I can't find anything wrong with the network settings. Does anyone have a solution? Thank you.

    If the portion of the machine has activated - Simple file sharing (i.e. it is XP Home or it is XP Pro with Simple (default) file sharing) - while all file sharing connections authenticate as user 'guest '.  It will not matter what username / password you provide, it will attempt to authenticate as 'guest '.  If the guest user has received a password or the guest account is not active, you will experience the symptoms you describe.

    If the serving machine running XP Pro and Simple file sharing is disabled, then you should be able to connect by specifying the user as computer\user and the password to connect.  To turn off Simple file sharing:

    "How to disable the file sharing simple and how to set permissions on a shared folder in Windows XP"
      <>http://support.Microsoft.com/kb/307874 >

    Also:
    "Description of the account in Windows XP"
      <>http://support.Microsoft.com/kb/300489 >

    HTH,
    JW

  • file permission security and files on the shared drive

    Hi, we have a folder called 'Team' in the shared drive \\India\Team. I placed an excel file named "Hourly" activation "share workbook" option for multiple users in my team. I have a total control on the 'Team' folder access I want to give read access to the members of my team 5 at the level of the 'Team' folder and change the access to my 5 members of the team at level 'hourly production' file so that all members can be updated hourly count at the same time. Limitation should be my team members should not be able to rename the folder 'Team' and should not be able to delete the file 'hourly Production '. I tried a lot of things, but it does not work. Please help me. My mail id is * address email is removed from the privacy *.

    Hi Christine,

    Welcome to the Microsoft community.

    According to the description you have provided to assign the read permission for the file in the shared drive.

    I advise you to check what are the rights that the user has to the shared folder. Please login as an administrator.

    a. right click on the folder, click Properties - Security tab - advanced

    b. click effective permissions, click Select, enter the user account, and then click OK.

    c. check what are count it the permissions the user has.

    d. If the user does not have sufficient permissions, click the permissions - changes to the permissions tab.

    e. click Add, enter the user name, click OK

    f. Select the appropriate permissions for the user, and then click OK.

    See: How to open a file if I get an access denied message?
    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-open-a-file-if-I-get-an-access-denied-message

    File sharing essentials
    http://Windows.Microsoft.com/en-us/Windows7/file-sharing-essentials

    If you have any further questions on Windows, feel free to let us know. We will be happy to help you.

  • After downloading my file from the word document is mostly gibberish.  Why? the service used exportPDF

    After downloading my file from the word document is mostly gibberish.  Why? The service used "exportPDF.

    Hi shelbyrn,

    The quality of conversion is really depends on the quality of the original PDF file. Please see Will Adobe ExportPDF convert text and shape... | Adobe Community.  Do you know what who or how the PDF was created?

    You can have better luck by disabling OCR as described in this paper: How to disable the optical character recognition (O... |) Adobe Community. (Note, however, this is option is is not optimal if the PDF file is created from a scanned document, you wish to OCR enabled to convert the text from the image in the PDF file to editable text).

    Best,

    Sara

  • Pro 9 problem when 'Formatting' shows the Adobe document

    I started having this problem last week.  The Word document has the formatting as is is not necessary or not.  Insertions and deletions are provided only to be shown.  When I convert Word to Adobe "formatting" appears throughout my document from Adobe.  How can I get rid of the formatting on my Adobe Doc?  I've never had this problem before and it may be caused by a recent update of Microsoft Word or Adobe was last updated.

    You get the same result if you print to the Adobe PDF printer?

  • Workgroup Windows 7 - can see the folders, but not files in the shared directory

    I have three windows on the same workgroup machines (2 machines Windows 7 [A, B] and [C] XP machine). I have a shared folder on the [A], with many subfolders. When I created first the part, [B] has been able to see all files and folders in the shared directory on [A]. Next, I added several subfolders on [A]. Now, [B] can see new subfolders but not the files in the breast. Why is that happening and how can I solve this problem?

    [A] and [B] are capable of full access to the shared folders on [C]. The permissions on the shared folder on [A] are set to "Everyone" + read/write. I tried several reboots of each machine. Hit "Refresh" on [B] does not make the files appear. It is not password-protected. It turns out that [C] has exactly the same problem as [B], that makes me think there is something to do with the share on [A], but I can't understand it.

    On [A].

    Under sharing advanced > caching, I chose only "the files and programs that specify users are available in offline mode."

    Under [advanced sharing] > permissions, "Everyone" is given full control, change, and read them.

    Under [advanced sharing] > permissions > Add > locations, machine [A] is visible, but are not machines [B, C].

    Any thoughts? Thanks in advance!

    Hello

    Thanks for the reply and keeping the status updated.

    There are options of shares with different depending on whether your PC is connected to a network and what type of network is.

    To share the points with a particular person, choose the account of this person.

    To share with all members of your home group, choose one of the options Group of the House .

    To select libraries to share with all the members of your home group, swept from the right edge of the screen, tap settingsand then tap Change PC settings. (If you use a mouse, point to the upper right of the screen, move the pointer of the mouse down, click settingsand then click change PC settings). And then tap or click home group.

    To prevent a file or a folder shared with anyone, press or click the share tab and then press or click stop sharing.

    To change the level of access to a file or folder, press or click on the sharing tab, and then select Home group (view) or collective (view and edit) home.

    If you need to share a location such as a disk or system file, use the Advanced sharing option.

    Change the settings for network, file sharing discovery, sharing public folders, sharing protected by password, home group of connections and file sharing connections.

    To turn on network discovery, file and sharing printers, and public folder sharing in Windows 7

    Control Panel > network and sharing Center > change advanced sharing settings > public folder sharing.

    -Turn on sharing so anyone with network access can open files.

    -Turn on sharing so anyone with network access can open, change and create files.

    Hope this information is useful. Just reply with the results. We will be happy to help you. 

  • Problems when viewing files in the 'My Documents' window

    When I look at the files and folders in the My Documents window (in mode ' list') there is a wide space between the columns of information - I can barely hold two columns of names of files on my computer screen even if I do the window the maximum width.  It is a new problem - I used to be able to view the columns 3 or 4 names of files before.  My OS is Windows XP. Can you tell me how to reduce the space between the columns of information?  Thank you.

    Thanks for your reply "Tricky", unfortunately it doesn't work in "List" mode, and it is has no column headers.

    Apologies,

    I've been guilty of reading what I thought I only saw what I saw in fact.

    The only thing I know to which increases the width of the columns in the list view is the size of the names appearing in this column, they are files or folders. Check the lengths of file/folder name by renaming them, there might be some characters non-display, resizing of the window in the vertical direction might help identify the sections where the long name exists (if indeed that is the problem).

    Tricky

  • Save the file to the shared folder in Release Build works, but not in Export version

    We are ready to present our application to App World. However, we noticied when testing the 'export release' that build our file saving function of does not work (the file is not be saved - but the folder we created). The file records fine when running in debug or release mode, but not to export the final file.

    Is - this all simply because we are not supposed to try to run the bar directly exported version file and it should work once on App World? Has anyone experience this problem?

    We are trying to back up the folder "shared/music/AppName" If that helps.

    We have corrected it. We were writing somehow to the wrong address in the "shared". For some reason, it still worked when you use version debug/directly from the IDE, but does not when exported. That's all now works well.

  • Cannot open the files from the shared network drive

    Hi, I am trying to open a file located on a server of storage attached to the network in a shared drive. When I try to open the file in Photoshop CC 2014 directly or by double-clicking in the file Explorer, I get a pop-up box in Photoshop that says that the image of CR2 is not the right kind of document. If I copy the file to another USB drive attached, the file opens correctly in Camera Raw.

    This will give you tangentially more insight in the work through a network to NOT be supported by Adobe:

    This is the standard text often used for saving to a network (NOTE the part where he explains that normally, it works, but it is impossible to solve someone else on the network remotely, and that's why he didn't is not supported by Adobe):

    If you open files on a network, or saved on a network server, please cease and desist immediately in the case where you currently have problems with one or more files. On a network is not supported.

    See:

    http://kb2.Adobe.com/CPS/406/kb406793.html

    Copy the local file CLOSED your server hard disk, work on it, again to save it on your local hard drive, close it and copy the closed file on the server.
     
    Of course, the fact that Adobe does not support work on a network does not necessarily mean that it doesn't work.  It should be.

    Adobe position is that there are too many variables in a network environment for them to ensure that everything will work properly in all systems, particularly in view of the fact that that something will not work properly, it is probably the fault of the network, and Adobe has no way of troubleshooting of your network.

    If you are unable to work locally, you are yourself, and if something happens, you're on your own. If you work from a server, make sure that your network administrator is a competent professional.

    When problems arise, much valuable work can be lost.

  • Sync Center gets stuck saying "pending sync", never synchronizes the files on the shared folder offline

    Hello

    I have a laptop (Compaq 8440) running Windows Vista Enterprise (not yet upgraded to SP1).  I have a shared folder mapped to the N: drive on my laptop.  This shared folder is located on a computer on my home network.  Every day, I move my laptop between my home network (wireless) and my work network (cable intranet).

    I scored a subfolder in the shared folder available offline.  It worked for about two weeks, but now when I try to synchronize with the shared folder offline files, Sync Center has constantly "waiting for synchronization" status  He never goes out with synchronization, regardless how long wait.

    I tried clicking "stop"button in Sync Center, but this does not prevent the synchronization.  I do not see error messages or the situation in Sync Center.

    I tried to restart the laptop, but nothing helped.  I tried to disable/reactivate the wireless connection, but nothing helped.  I can connect to the shared folder and discovers the other directories that are not 'available offline", is not a connectivity problem.

    Thank you
    Jason Fritz

    Hi Jason,

    You can try to remove the sync partnership and add it back.  Who can get things working again.  See the following link on how to put an end to partnerships, then in the section above, how to create them.
    http://windowshelp.Microsoft.com/Windows/en-us/help/1074e034-1bcf-4dfb-93c3-46ec7df97d371033.mspx#E6E

    Introduction to offline files.  Contains links to the different problems of synchronization.
    http://windowshelp.Microsoft.com/Windows/en-us/help/93a550df-34cd-4497-85d0-8732602f59591033.mspx

    Troubleshoot synchronization issues.
    http://windowshelp.Microsoft.com/Windows/en-us/help/608639ce-27C8-42d5-AD3A-4bc641c9ca711033.mspx#E1AAC

    Please let us know if that helps the issue.
    Brent
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • When someoned saves a file to a shared drive on a network, why another person can't see the file on the shared drive?

    When you save a pdf file to one of our readers shared labour, we cannot always see the pdf file made by another partner so that we can combine multiple PDFs into one. If you open the file to a shared drive on the network and save to PDF on the drive in question, a dialog box is in place that the file is already there and you want to replace it, but it does not appear on pc, but, another partner can go to the shared drive and can see the file while others do not. What can cause that?

    Hello

    According to the description, you are facing problems with file sharing on a shared drive on a network. In order to quickly provide a solution, please answer these questions:

    1. what type of network, the computer is connected to?

    2. what security software is installed on the computer?

    In the meantime, you can consult the following articles for more information on the file share:

    Share files with anyone

    http://Windows.Microsoft.com/en-us/Windows7/share-files-with-someone

     

    Find files and folders on other computers on a network

    http://Windows.Microsoft.com/en-us/Windows7/find-files-and-folders-on-other-computers-on-a-network

     

    File and printer sharing: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/file-and-printer-sharing-frequently-asked-questions

    Hope this information helps. Reply with more information about the issue so that we can help you better.

Maybe you are looking for

  • Pavilion 15 n201tu: can I upgrade my cpu

    my laptop is HP Pavilion 15 n201tu.ca I spend my 3rd gen to any other i3 cpu can also map system can changed.also the editable graphics card if I change the motherboard

  • Photosmart c6180 all in a pr: printer ink leaking

    My most old (5 years and more) had a message 'ink system failure' C 6180 printer all-in-one and on the survey, seems to be leaking ink internally. Given his age, I guess it would be smarter and probably cheaper) to be replaced by a new printer rather

  • No comparison Condition

    In the following statement why not use terms such as 'Like' or 'In' instead of 'Not '.  Honestly I skipped this part of my reading I understood implicitly given logic, I've been doing SQL for a bit, but do not include it in explicit terms.Thank you.S

  • I downloaded and installed CC and I get a blank screen

    I subscribed to the cloud of Creativ. Want to download the Client, something happens, an empty page also by photoshop and the others.what did I have to do, to come to the first stage = download and installation? Support I hope you understand what I m

  • Window minimized Disappering

    In older versions of PS I will work with all windows to floating images on PC. I would minimize a document window, and a smaller version of it seems near the lower left corner of the screen. I can double click on this reduced image and it would be fo