[TIMOB-11547] iOS: Passing null in the fireEvent throws error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-10-31T00:50:42.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Nikhil Sharma |
Assignee | Vishal Duggal |
Created | 2012-10-20T01:56:30.000+0000 |
Updated | 2017-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();
Closing ticket as duplicate.