While using dynamically ScrollView parameter contentOffset it reponds with an error message in the log window:
1. Execute the sample code
2. Press "Jump To" button
3. Check the log window - ERROR message would appear
var scrollView = Ti.UI.createScrollView({
showHorizontalScrollIndicator:true, showVerticalScrollIndicator:true,
width: 250, height: 250, top: 50,
borderColor:'green', borderWidth:1,
contentWidth:1000, contentHeight:1000,
contentOffset: { x:300, y:300}
});
scrollView.add(Ti.UI.createLabel({
top: 0,
left: 0,
width: 500,
height: 500,
backgroundColor: "blue",
text: "test"
}));
var win = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var b2 = Ti.UI.createButton({title:'Jump To', width:100, height:50, bottom: 30});
b2.addEventListener('click', function() {
scrollView.contentOffset = {x:300, y:300};
});
win.add(scrollView);
win.add(b2);
win.open();
I get the same error message but not for the same problem. For me it seems like it has nothing to do with the contentOffset call but with the actual assignment of the listener.
Closing ticket as duplicate of TIMOB-6650 which provides more information.