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

Native Development

Reply
Developer
Posts: 36
Registered: ‎09-17-2012
My Device: 9810-Playbooks-devalpha-Z10
My Carrier: Free mobile
Accepted Solution

dialog_create_filebrowse marked as deprecated?

Is there anything new we can use to create a filebrowser? It still works, but it's strange. Also, it doesn't show some extension if they are not known. Is it an error in implementation (I'm using the code found at "FileBrowse sample : Using native filebrowse and filesave dialog in Cascades").

 

Thanks for help.

 

Fred

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: dialog_create_filebrowse marked as deprecated?

[ Edited ]
Developer
Posts: 36
Registered: ‎09-17-2012
My Device: 9810-Playbooks-devalpha-Z10
My Carrier: Free mobile

Re: dialog_create_filebrowse marked as deprecated?

Thanks for the quick answer, I missed this one when browsing the doc.

 

Any solution if I don't want to use a standard extension (".lib" for example).

 

 

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: dialog_create_filebrowse marked as deprecated?

[ Edited ]

Sorry, but I don't understand what you're asking Smiley Sad You want to use your own custom extensions like in deprecated api or I'm wrong ?

Developer
Posts: 36
Registered: ‎09-17-2012
My Device: 9810-Playbooks-devalpha-Z10
My Carrier: Free mobile

Re: dialog_create_filebrowse marked as deprecated?

Actually I never succeded to display document with an unknown extension in the file browser. I would like it to display all lib files (they are kind of sound files) that it find in the document folder.

 

Is there an easy way to do that, or must I create my own browser?

 

Thanks for your help

 

Cheers

Developer
Posts: 36
Registered: ‎09-17-2012
My Device: 9810-Playbooks-devalpha-Z10
My Carrier: Free mobile

Re: dialog_create_filebrowse marked as deprecated?

Let it go, I found what I was missing to achieve this. And it works well now.

Thanks a lot for the quick answers.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: dialog_create_filebrowse marked as deprecated?

FredTBB, maybe you could share your solution with everyone else here so others can benefit?


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 36
Registered: ‎09-17-2012
My Device: 9810-Playbooks-devalpha-Z10
My Carrier: Free mobile

Re: dialog_create_filebrowse marked as deprecated?

There is no special solution, you just have to follow what is written in the sample. I changed a line in the qml file and stupidly copy back the code from the documentation page, so my first changes were removed...

My mistake.

 

As proposed by borceg, The filepicker is all that is needed https://developer.blackberry.com/cascades/reference/bb__cascades__pickers__filepicker.html

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: dialog_create_filebrowse marked as deprecated?

I assume in order to display anything different than music/photo/video/docs we should use FileType:Smiley Surprisedther, but I have no idea whether it will look for files in other dirs, example misc
Developer
Posts: 36
Registered: ‎09-17-2012
My Device: 9810-Playbooks-devalpha-Z10
My Carrier: Free mobile

Re: dialog_create_filebrowse marked as deprecated?

the answer is here:

The application invoking the FilePicker can also provide a custom filter and/or the directory that FilePicker will display on open. This will override the filter and folders associated with the file type. The filter is the list of string patterns that supports wildcards. For example, if the filter string is "*.jpg", FilePicker will list files where the file has an extension of ".jpg".

 

Fred