Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14838] BlackBerry: 'JSON.stringify(e.source)' does not return the properties of the object

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-06-05T20:24:40.000+0000
Affected Version/sRelease 3.1.2
Fix Version/s2013 Sprint 19, 2013 Sprint 19 API, Release 3.2.0, Release 3.3.0
ComponentsBlackBerry
Labelsqe-3.1.2, qe-3.3.0, qe-nfc, qe-testadded
ReporterLokesh Choudhary
AssigneePedro Enrique
Created2013-08-12T22:00:05.000+0000
Updated2014-06-18T00:02:25.000+0000

Description

Description: 1. Create a default app for BB & replace the code in the app.js with the code below:
var win = Ti.UI.createWindow({
  backgroundColor: 'white',
  title: 'ScrollView Demo'
});
  
var scrollView = Ti.UI.createScrollView({
  contentWidth: 'auto',
  contentHeight: 'auto',
  showVerticalScrollIndicator: true,
  showHorizontalScrollIndicator: true,
  height: '80%',
  width: '80%',
  backgroundColor:'#336699'
});
  
scrollView.addEventListener('click',function(e){
    Ti.API.info(e.source);
    Ti.API.info(JSON.stringify(e.source));
    Ti.API.info(JSON.stringify(e));
});
win.add(scrollView);
win.open();
2. Build & run on BB device/simulator 3. On the app launch tap on the scrollview & observe the studio console Actual Results: 1. We only get
{"showVerticalScrollIndicator":true,"showHorizontalScrollIndicator":true}
and not all the proporties of the object Expected Result: 1. We should get all the proporties of the object

Comments

  1. Pedro Enrique 2013-09-16

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/175
  2. Priya Agarwal 2013-11-12

    Tested Environment: Appcelerator Studio: 3.2.0.201311120707 SDK:3.2.0.v20131111174605 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 'JSON.stringify(e.source)' returning all the properties of the object. Used the above code to test.
  3. Olga Romero 2014-06-03

    Tested environment Mac osx 10.9.3 Mavericks Appcelerator Studio, build: 3.3.0.201405271647 Titanium SDK, build: 3.3.0.v20140603032057 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-beta npm@1.3.2 titanium@3.3.0-beta2 titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1)

    Actual result

       [INFO] [object ScrollViewContentViewProxy]
       [INFO] {}
       [INFO] {"type":"click","x":112,"y":199,"source":{}}
       [INFO] [object ScrollViewContentViewProxy]
       [INFO] {}
       [INFO] {"type":"click","x":121,"y":228,"source":{}}
       

    Expected

    Should display similar to this output
       [INFO] [object ScrollView] 
       [INFO] {"contentWidth":"auto","contentHeight":"auto","showVerticalScrollIndicator":true,"showHorizontalScrollIndicator":true,"height":"80%","width":"80%","backgroundColor":"#336699"} 
       [INFO] {"x":357.20001220703125,"y":610.0999755859375,"source":{"contentWidth":"auto","contentHeight":"auto","showVerticalScrollIndicator":true,"showHorizontalScrollIndicator":true,"height":"80%","width":"80%","backgroundColor":"#336699"}}
       
  4. Pedro Enrique 2014-06-05

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/263
  5. Samuel Dowse 2014-06-18

    Verified fixed on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201406111953 Titanium SDK, build: 3.3.0.v20140617161713 Titanium CLI, build: 3.3.0-rc Alloy: 1.4.0-rc BlackBerry SDK, build: 10.2.0.1155 BlackBerry Simulator: 10.3.0.440 BlackBerry Device: 10.2.1.2947 Console Logs display:
       [INFO] [object TiUIScrollViewProxy]
       [INFO] {"contentWidth":"auto","contentHeight":"auto","showVerticalScrollIndicator":true,"showHorizontalScrollIndicator":true,"height":"80%","width":"80%","backgroundColor":"#336699"}
       [INFO] {"type":"click","x":158,"y":215,"source":{"contentWidth":"auto","contentHeight":"auto","showVerticalScrollIndicator":true,"showHorizontalScrollIndicator":true,"height":"80%","width":"80%","backgroundColor":"#336699"}}
       
    Closing.

JSON Source