[TIMOB-6650] iOS: ScrollView - [ERROR] Adding an event listener to a proxy that isn't already in the context
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-02-01T17:46:05.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Jon Alter |
Assignee | Stephen Tramer |
Created | 2011-12-13T16:59:01.000+0000 |
Updated | 2017-03-20T22:07:14.000+0000 |
Description
This error shows in the console log when setting the contentOffset of the scrollView in this example
[ERROR] Adding an event listener to a proxy that isn't already in the context.
If you comment out the contentOffset in the scroll eventListener, there is no error.
Step 1: run the code below
Step 2: scroll the view
Step 3: notice the error in the console
var win = Ti.UI.createWindow({
backgroundColor : '#fff'
});
var layer1 = Titanium.UI.createScrollView({
zIndex : 1,
contentWidth : 'auto',
contentHeight : 'auto',
top : 0,
layout : 'horizontal',
contentOffset : {
x : 0,
y : 0
}
});
var controlScroll = Titanium.UI.createScrollView({
zIndex : 10,
contentWidth : 1000,
contentHeight : 480,
showHorizontalScrollIndicator : true,
top : 0,
layout : 'horizontal'
});
controlScroll.addEventListener('scroll', function() {
var x = controlScroll.contentOffset.x;
layer1.contentOffset = {
x : (x * 1.3)
};
})
for(var i = 0; i < 10; i++) {;
layer1.add(makeView('blue'));
}
function makeView(color) {
var view = Ti.UI.createView({
left : 100,
width : 20,
height : 480,
backgroundColor : color
});
return view;
}
win.add(layer1);
win.add(controlScroll);
win.open();
SDK 1.8.1 shows ~ 36 errors - any answer from appcelerator team would be so great
I'm getting this error multiple times after updating to SDK 1.8.1, without contentOffset being involved. App appears to run fine.
Running the sample code, I'm seeing the error even if the entire event listener is commented out. So as Steve says, seems unrelated to contentOffset--or even to adding an event listener.
I am seeing this error when using a *ScrollableView* -- it fires each time I switch between child views while running the app. Behavior started with the 1.8.1 builds (first build tried 1.8.1.v20120123161633)
This bug is scheduled for the 1.9 release which is slated for end of March. Should show up in the CI build earlier. Please watch the status of this bug switch to "Resolved" if you want to verify. It will be fixed when the status is marked "Closed".
Duplicate of TIMOB-7347.
any solution to this problem ? our application can be rejected by Appel ? thanks !
I get this error messages in 1.8.1 when using the scrollTo(X,Y) on a ScrollView. App seems to be working fine. Sounds like this is fixed now?
This should be fixed in 1.8.2.
This does look to be fixed in 1.8.2, but I do see a very similar error/issue when using backgroundGradient in the constructor for Views.
Closing ticket as duplicate.