Project: titanium
Issue TIMOB-18326: Windows: JSValue context issue
Parroting bug discovered by @garymathews in #23: > There's a bug with JSValue that prevents it's value being set from another context due to the 'new' context overwriting the one the JSValue was created with. Shouldn't we be retaining the context and just setting the value? *Example* {code} Javascript var window = Ti.UI.createWindow(); var button = Ti.UI.createButton({ top: 20, bottom: 20, width: 200, height: Ti.UI.SIZE }) // Set the title // This doesn't crash because the text 'BUTTON' belongs to the same // context 'button' was created in button.title = 'BUTTON'; button.addEventListener('click', function (e) { // This will cause a crash due to the context of 'CRASH!' // overwriting the context 'title' was created with // shouldn't we be retaining the original context? button.title = 'CRASH!'; } ); window.add(button); {code}
Story points: 13