json.i18n-for-Titanium-Mobile icon indicating copy to clipboard operation
json.i18n-for-Titanium-Mobile copied to clipboard

String.format is undefined on BlackBerry

Open stevelacey opened this issue 13 years ago • 4 comments

Meaning getFormattedString fails, I hacked this fixed with:

    } else if (Ti.Platform.osname == 'blackberry') {
        // BlackBerry doesn't have String.format, fix better when necessary
        return val.replace('%s', arguments[1]);
    }

Obviously, this only works because my usage is basic (only ever one param passed). This should probably be polyfilled if you can find a reliable source for the method.

stevelacey avatar Oct 19 '11 09:10 stevelacey

Thanks Steve, I'll integrate and push (unless you want to create a pull request?).

BTW. Did you say that Blackberry support is now discontinued altogether?

mattheworiordan avatar Oct 19 '11 09:10 mattheworiordan

I don't have a proper solution, I just hacked it fixed so that I can get off BB dev and onto something interesting.

RE Appcelerator:

I get the impression that there won't be another release of the Ti BB SDK and that they won't be supporting >6.x. I don't think they're working on it at all.

I think they want to encourage use of their HTML5 (Mobile Web) SDK for future BB dev.

Steve

Sent from my iPhone

On 19 Oct 2011, at 10:28, Matthew O'Riordan [email protected] wrote:

Thanks Steve, I'll integrate and push (unless you want to create a pull request?).

BTW. Did you say that Blackberry support is now discontinued altogether?

Reply to this email directly or view it on GitHub: https://github.com/mattheworiordan/json.i18n-for-Titanium-Mobile/issues/3#issuecomment-2453705

stevelacey avatar Oct 19 '11 09:10 stevelacey

Hi Steve

Apologies for taking so long, but I think I've just pushed up a decent solution to the problem.

Would you mind confirming if it works on Blackberry as I can't test that.

Matt

mattheworiordan avatar Nov 07 '11 08:11 mattheworiordan

Here's the commit btw. https://github.com/mattheworiordan/json.i18n-for-Titanium-Mobile/commit/16e4a1b5103bc7942470cd7bfb0ab27fb3dc0c42

mattheworiordan avatar Nov 07 '11 08:11 mattheworiordan