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
New Developer
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Browse dialog

Hello,

 

Is there or will there be a browse dialog on the PlayBook?

 

Tjitte


My PlayBook app:
DrawBook
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Browse dialog

You can browse from an application if that is what you are asking.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browse dialog

hey,

 

from my experience the File object's browse() method is really buggy. It never does what i want it to do. the fileFilters are never applied and sometimes dont work and you cannot change directories from the testing i've done. maybe i missed something but this seems super super buggy.

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
New Developer
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Browse dialog

I mean a standard browse dialog like in Windows.

Is there a standard browse dialog present or do I need to make my own?


My PlayBook app:
DrawBook
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browse dialog

[ Edited ]

hey Tjitte,

 

Yes there is a standard file browser API / method under the File class called browse(); It will open a dialog up on screen showing you a list of files and when you select a file it will dispatch an Event.SELECT event and with it the file data. Using the following code will cause a dialog to pop up:

 

 

import flash.filesystem.File;

(...)

var myFile:File = new File();

myFile.browse();

myFile.addEventListener(Event.SELECT, chooseFile);

(...)

public function chooseFile(e:Event):void
{
      trace(e.target.nativePath);
}

 

You can run it in both the desktop and simulator environments and see the difference. In the simulator you will be wanting more. you are probably better off creating your own. good luck!

 

for more information on the File class and how to utilize its methods, here are the ASDocs:

 

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/filesystem/File.html

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
New Developer
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Browse dialog

[ Edited ]

File.browse() is what i'm looking for but it has some bugs.

It shows for example wrong image thumbnails.

  

Thank you for your help.


My PlayBook app:
DrawBook
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browse dialog

yeah unfortunately we have to work with what we have - no matter how little. but if you're ambitious enough you crank out your own API using the File class to do what it cannot do as of right now.

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
New Developer
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Browse dialog

Will all the standard dialogs be better in the future?


My PlayBook app:
DrawBook
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browse dialog

[ Edited ]

This is just the beta stage of the SDK and its really young. As it matues theoretically everyhting will better in the future. But this feature is a required one that definitely will be fixed if playbook wants to be fully capable in every respect. and file browsing is one of those core features that needs to be ironed out with no bugs. So yeah i'd put my money on it being perfected.

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
Developer
Posts: 41
Registered: ‎11-01-2010
My Device: BlackBerry Bold 9780, PlayBook 16GB, PlayBook 32GB
My Carrier: Bell

Re: Browse dialog

Does anyone know if the browsefordirectory will be supported?

 

File.browse shows the dialog for choosing a file in the simulator, but file.browseForDirectory doesnt Smiley Sad