Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11547] iOS: Passing null in the fireEvent throws error

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-10-31T00:50:42.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterNikhil Sharma
AssigneeVishal Duggal
Created2012-10-20T01:56:30.000+0000
Updated2017-03-20T22:18:48.000+0000

Description

Passing null in the fireEvent throws error. It works fine Ti SDK 2.1.3.GA [ERROR] Script Error = -[NSNull objectForKey:]: unrecognized selector sent to instance 0x3680678

Repo Steps

1. Run the below code in app.js 2. Click the button and you'll get an error
var win = Ti.UI.createWindow({
	layout : "vertical",
	backgroundColor : "#fff"
}), v = Ti.UI.createView({}), b = Ti.UI.createButton({
	title : "Throws an event error?"
});
b.addEventListener("click", function(e) {
	v.fireEvent("something", null);
});
win.add(b);
win.open(); 

Comments

  1. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source