[TIMOB-3798] proxies fail to retain (in terms of scoping) properties set at creation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-05-13T16:32:04.000+0000 |
Affected Version/s | Release 1.7.0 |
Fix Version/s | Release 1.7.0, Sprint 2011-17 |
Components | iOS |
Labels | ios, ios_proxy_registration |
Reporter | Blain Hamon |
Assignee | Blain Hamon |
Created | 2011-04-27T18:28:51.000+0000 |
Updated | 2011-05-13T16:32:04.000+0000 |
Description
Credit goes to Shannon Hicks of Pintley
=======
Blain,
Here's a bit of my code:
pintley.ui.screens.createLeaderboardTab = function(_data,_returnView) {
var leaderboardWindow = Titanium.UI.createWindow($$.Window);
pointsData = _data;
tableData = [];
tableRows = [];
// display objects
tableView = Titanium.UI.createTableView({
data:tableRows,
backgroundColor:'white'
});
leaderboardWindow.add(tableView);
// when this window is shown, get some data
leaderboardWindow.addEventListener('open',function(){
alert('you opened this tab');
});
var tab = Titanium.UI.createTab({
icon:'images/tab_friends.png',
title:'Leaderboard',
window:leaderboardWindow
});
return tab;
};
When this code is the second Tab in a TabGroup, upon switching to the tab, sometimes the "open" event fires, but most of the time it doesn't. Hope this helps.
Fixed this by changing setValuesForKeysWithDictionary (Which IS a path traversed by proxy creation) to handle JS ownership for us.
Verified fixed. (1_7_X, e6afca8..., iOS Simulator and Verizon iPhone 4 device.)