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

Adobe AIR Development

Reply
Developer
Levion
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520

browseForSave doesn't work in simulator

Hi,

 

I want to let the user save a file to a choosen location. But it seems that the event after selection isn't triggered.

 

 

public function eventSelectFileSave(event:Event):void {
      // this event is triggered in air from IDE but not in simluator
}
        
private function SaveAs():void
{
    var file:File = new File();
            
    file.addEventListener(Event.SELECT, eventSelectFileSave);
    file.browseForSave("Save File");

}

 

 

Is there another way to solve this OR is this a bug, yet? The class "File" comes from flash.filesystem. I am not sure that was the right choice.

 

best regards

 

Levion

 

 

 

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: browseForSave doesn't work in simulator

hey,

 

from what i've seen (and tested) none of the file.browse[ForSave,Directory, etc] work as expected (and sometimes dont work at all). they all seem to just pop up a directory for images that never change sometimes (unless you really try to and change them). maybe someone found a workaround since the last discussion but to the best of my knowledge its a no go and you have to work without it for now or of course you can always build your own! :smileyhappy:

 

some threads from the past:

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Browse-to-image-directory/m-p/650...

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/how-to-choose-file/m-p/666849#M20...

 

hope that helps. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
TheDarkIn1978
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook

Re: browseForSave doesn't work in simulator

[ Edited ]

target flash.filesystem.File.applicationStorageDirectory rather than permitting users to choose where to save.  when users want to open a file, simply list the files in applicatonStorageDirectory (perhaps adding logic filtering files with a certain extension).

 

use flash.filesystem.FileStream to save files to and open files from the applicatonStorageDirectory.


PlayBook Applications:
Drop Swatch
Please use plain text.
Developer
kaputafj
Posts: 57
Registered: ‎05-04-2009
My Device: 9550

Re: browseForSave doesn't work in simulator

has anyone had any success with saving files in 0.9.2?

I have not :smileysad:

although the dialogs don't show those images anymore....

Thanks,

Frank

Please use plain text.