Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14664] BlackBerry: Ti.Utils object is undefined so using it causes a crash.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-09-19T20:56:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.2.0
ComponentsBlackBerry
Labelsdocumentation, qe-testadded
ReporterRussell McMahon
AssigneePedro Enrique
Created2013-07-26T03:28:59.000+0000
Updated2014-02-19T23:28:08.000+0000

Description

Test var key = Ti.Utils.sha1(String/Titanium.Blob obj); console.log(key);

Comments

  1. Russell McMahon 2013-07-27

    Currently the Ti.Utils is not exposed externally. We have scheduled it for the 3.2 release. If your using Ti.Utils please wrap it in a platform conditional. If wrapping the Ti.Utils call causes problems please note what your app is doing and we will see about upping the priority of the fix higher.
  2. Pedro Enrique 2013-09-19

    Test code
       var win = Ti.UI.createWindow({
       	layout: 'vertical'
       });
       
       function Button(_title, _callback) {
       	var btn = Ti.UI.createButton({
       		title: _title,
       		top: 10
       	});
       	
       	btn.addEventListener('click', _callback);
       	return btn
       }
       
       win.add(Button('base64encode', base64encode));
       win.add(Button('base64decode', base64decode));
       win.add(Button('md5', md5));
       win.add(Button('sha1', sha1));
       win.add(Button('sha256', sha256));
       
       win.open();
       
       function base64encode() {
       	var result = Ti.Utils.base64encode('Titanium Rocks!').text;
       	Ti.API.info('base64encode');
       	Ti.API.info(result);
       }
       function base64decode() {
       	var result = Ti.Utils.base64decode('VGl0YW5pdW0gUm9ja3Mh').text;
       	Ti.API.info('base64decode');
       	Ti.API.info(result);
       }
       function md5() {
       	var result = Ti.Utils.md5HexDigest('Titanium Rocks!');
       	Ti.API.info('md5');
       	Ti.API.info(result);
       }
       function sha1() {
       	var result = Ti.Utils.sha1('Titanium Rocks!');
       	Ti.API.info('sha1');
       	Ti.API.info(result);
       }
       function sha256() {
       	var result = Ti.Utils.sha256('Titanium Rocks!');
       	Ti.API.info('sha256');
       	Ti.API.info(result);
       }
       
    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/176
  3. Priya Agarwal 2013-11-13

    Verified with Environment: Appcelerator Studio: 3.2.0.201311122045 SDK:3.2.0.v20131112180422 alloy: 1.3.0 acs: 1.0.7 npm: 1.3.2 titanium: 3.2.0 titanium-code-processor: 1.0.3 Xcode:5.0.1 Device: Blackeberry Z 10 OS: Mac OSX 10.9 BB OS 10.0.10.261 Above mentioned code used for testing. Ti.Utils working fine. Hence closing as working well and verified.

JSON Source