Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6665] Android: Default max event listeners is set to 10

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-12-14T18:26:40.000+0000
Affected Version/sSprint 2011-50, Release 1.8.0.1
Fix Version/sSprint 2011-50, Release 1.8.0.1, Release 2.0.0
ComponentsAndroid
Labelsmodule_gesture, qe-testadded
ReporterAllen Yeung
AssigneeAllen Yeung
Created2011-12-14T12:32:56.000+0000
Updated2014-06-19T12:43:45.000+0000

Description

We currently set the default max listeners to 10 in events.js. We will want to remove the max listener-related code since we don't expose this.

Comments

  1. Allen Yeung 2011-12-14

    Steps to reproduce: Run the following app.js:
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	alert("asdf");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       	Ti.API.info("orientationchanged!-----------------");
       });
       
    Expected: It will print the info statements and open the alert dialog when you switch orientations Actual: JS Runtime error for too many listeners
  2. Wilson Luu 2012-01-12

    Closing bug. Verified fix on: SDK build: 1.9.0.v20120112104633 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201111843 Device: Droid 3 (2.3.4)

JSON Source