[TIMOB-4949] iOS: Show all the children of a touchstart event's e.source in debugger
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-02-13T15:13:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Jon Alter |
Assignee | Eric Merriman |
Created | 2011-07-29T17:35:32.000+0000 |
Updated | 2020-02-13T15:13:21.000+0000 |
Description
When debugging a touchstart event, you can not see all the children of e.source.
Android only shows "e.source.backgroundColor"
iOS only shows "e.source.backgroundColor", "e.source.barColor", "e.source.barImage", and "e.source.orientationModes".
There should be more children, "e.source.center" for example. As demonstrated in the code.
Step 1: debug using the code below (iOS and Android)
Step 2: set a breakpoint in the touchstart eventListener
Step 3: click the window
Step 4: inspect the e.source variable
Step 5: notice that "e.source.center.x" is displayed in the console but not in the debugger
var win = Ti.UI.createWindow({
backgroundColor: 'blue'
});
win.addEventListener('touchstart', function(e){
Ti.API.info("Touch Started for view: " + e.source);
Ti.API.info("View Center: " + e.source.center.x + "," + e.source.center.y);
Ti.API.info("e.globalPoint: " + e.globalPoint);
Ti.API.info("Start Touch: " + e.globalPoint.x + "," + e.globalPoint.y);
});
win.open();
Max, thoughts?
We show everything the debugger host reports to us. Marshall, Stephen - your ideas ?
Updating severity, as per Studio severity.
See my comment above. This should probably be marked WON'TFIX or for a distant future version. It would require one of the following: * Some serious changes to the debugger to use Obj-C runtime inspection, check against a whitelist, and computation (which may again lead to deadlock) * Completely restructuring the internal representation of object properties for the iOS Kroll layer Note that "not all" properties are available when inspecting a view proxy directly, either.