Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2018] Android: Implement Synthetic Events on Proxies

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:49.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M01
ComponentsAndroid
Labelsandroid, feature
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T03:08:15.000+0000
Updated2011-04-17T01:57:49.000+0000

Description

See #581

Basically I should be able to add an event listener to a proxy and fire it. Ticket #581 is specifically about Window(Views) but this should be a TiProxy capability, not just TiViewProxy.

Comments

  1. Don Thorp 2011-04-15

    Should already be working.

  2. Don Thorp 2011-04-15

    Verified that the code from #581 works as expected. I've included the code inline below to make testing easier.

       
       Titanium.UI.setBackgroundColor('#000');
       
       var tabGroup = Titanium.UI.createTabGroup();
       
       var win = Titanium.UI.createWindow({  
           title:'Tab',
           backgroundColor:'#fff'
       });
       
       var tab = Titanium.UI.createTab({
           icon:'KS_nav_ui.png',
           title:'Tab',
           window:win
       });
       
       var alt = Titanium.UI.createAlertDialog({
         title: 'clicked!',
         message: ''
       });
       
       
       var button = Titanium.UI.createButton({
           title:'Fires synthetic event',
           height:40,
           width:200,
           top:10
       });
       
       var button2 = Titanium.UI.createButton({
           title:'Simple Click event',
           height:40,
           width:200,
           top:100
       });
       
       button.addEventListener("click", function() {
         win.fireEvent("foo");
       });
       
       button2.addEventListener("click", function() {
         alt.show();
       });
       
       win.add(button);
       win.add(button2);
       
       win.addEventListener("foo", function() {
         alt.show();
       });
       
       tabGroup.addTab(tab);
       
       tabGroup.open();
       
  3. Thomas Huelbert 2011-04-15

    confirmed g2 and 2.1 sim (1.5.0.7d08f15), added test to bugtests

JSON Source