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

Reply
Developer
n_jay144
Posts: 69
Registered: ‎09-05-2012
My Device: Z10 Red, PlayBook, DevAlpha C
Accepted Solution

Error in File Picker BB10

When I try to pick a file on my DevAlpha A device containing an apostrophe in filename, for example: "Gettin' Over You (Featuring Fergie & LMFAO).mp3" file picker return syntax error : At least one digit must occur after a decimal point.

 

I would like to ask is this possible to fix this error?

Thanks in advance.

Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: Error in File Picker BB10

How are you trying to pick it? When I do the same using the file picker app, everything seems fine. Are you invoking it with that as an argument to save as?

@erikjohnzon
erjohnson@blackberry.com
Developer
n_jay144
Posts: 69
Registered: ‎09-05-2012
My Device: Z10 Red, PlayBook, DevAlpha C

Re: Error in File Picker BB10

Hi erikjohnzon.

Thank you for the answer and sorry for insufficient data.

This is the code:

function invokeFilePicker() {
    var details = {
        mode: blackberry.invoke.card.FILEPICKER_MODE_PICKER,
        viewMode: blackberry.invoke.card.FILEPICKER_VIEWER_MODE_LIST
        };
        blackberry.invoke.card.invokeFilePicker(details, function (path) {
            console.log("saved "+ path);
            },
        function (reason) {
            console.log("cancelled " + reason);
            },
        function (error) {
            if (error) {
                console.log("invoke error "+ error);
            } else {
                console.log("invoke success " );
                }
            }
        );
    }

 So, when I try to pick a file named: Gettin Over You (Featuring Fergie & LMFAO).mp3 all works fine.

Console log is:

invoke success

saved /accounts/1000/shared/music/Test/Gettin Over You (Featuring Fergie & LMFAO).mp3

 

However when I try to pick a file: Gettin' Over You (Featuring Fergie & LMFAO).mp3 instead of value of path I can see only syntax error in console window:

invoke success

SyntaxError: At least one digit must occur after a decimal point

Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: Error in File Picker BB10

Nice job, you have found an error in our implementation of the file picker. I have confirmed that it is an issue with what we are doing. Apparently our encoder is not handling the single quotes properly. I will file an issue on our end and let you know how it goes.

 

You can track it here: https://github.com/blackberry/BB10-WebWorks-Framework/issues/385

 

Thanks so much for letting us know. You can track the progress throught that issue.

@erikjohnzon
erjohnson@blackberry.com
Developer
n_jay144
Posts: 69
Registered: ‎09-05-2012
My Device: Z10 Red, PlayBook, DevAlpha C

Re: Error in File Picker BB10

I checked in my DA-B with the latest OS version (10.0.10.648) and now bug is fixed.

Thank you BB.