Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6204] Android: V8 - fireEvent does not work for Views

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-01-05T13:24:13.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsbranch-v8, module_views, qe-testadded
ReporterPedro Enrique
AssigneeHieu Pham
Created2011-11-16T13:34:58.000+0000
Updated2013-11-07T05:47:05.000+0000

Description

Problem:

Setting a fireEvent() on any UI element does work with V8.

Example:

var win = Ti.UI.createWindow();

var btn = Ti.UI.createButton({title:'here'});

win.addEventListener('background', function(){
	win.backgroundColor = 'green';
});

btn.addEventListener('click', function(){
	win.fireEvent('background');
});

win.add(btn);
win.open();

To Reproduce:

Simple run the sample code in app.js and click the button.

What has to happen:

The background of the window has to turn green

What happens:

nothing

Comments

  1. Ping Wang 2011-11-17

    The pull request https://github.com/appcelerator/titanium_mobile/pull/710 should resolve this.
  2. Hieu Pham 2011-11-21

    Cannot reproduce with latest master.
  3. Natalie Huynh 2011-12-07

    Tested with 1.8.0.1.v20111207090257 with v8/rhino on Xoom (3.2.1) Samsung Tab 10.1 (3.1)
  4. Natalie Huynh 2011-12-07

    Need to open to add label
  5. Natalie Huynh 2011-12-07

    label added
  6. Natalie Huynh 2012-01-05

    Open to add label
  7. Shameer Jan 2013-11-07

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4887

JSON Source