PROBLEM DESCRIPTION
When a view has a height or width that is 'auto' and it ends up being 0 there is an error in the console. If possible we would like this error to also show the line number of the view in question.
STEPS TO REPRODUCE
1. Create new mobile project
2. Add the code to app.js
3. Run
ACTUAL RESULTS
[WARN] [object TiUIView] has an auto width value of 0, meaning this view may not be visible.
EXPECTED RESULTS
The same message, with the file and number of line of this happening.
[WARN] [object TiUIView @ app.js:3] has an auto width value of 0, meaning this view may not be visible.
var win=Ti.UI.createWindow({
background:'white',
});
var view=Ti.UI.createView({
width:0,
height:0,
background:'white',
});
var view2 = Ti.UI.createView({
width:'auto',
height:'auto',
});
view.add(view2);
win.add(view);
win.open();
Resolving this issue requires new code to interact with JSCore to get information about the current line of execution. Doing this outside of the debugger hooks may not even be possible. This has to be postponed until the 1.9 timeframe as a feature, not a bug.
JSCore definitely doesn't give iOS hooks to be able to do this without throwing exceptions, and Android reports the same. For internal messages like this we cannot report a line number, especially since autosizing may not even take place as part of serialized JS execution due to the threading environment.
Closing ticket as "Won't Fix".