[TIMOB-155] Custom Events on current window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:52:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.7.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:24:28.000+0000 |
Updated | 2011-04-17T01:52:10.000+0000 |
Description
Enable custom events to be fired and subscribed to within the Titanium.UI.currentWindow context:
// fire an event
// takes an event name and a JSON data object
Titanium.UI.currentWindow.fireEvent('foo', {name:'Joe'});
// subscribe to an event
Titanium.UI.currentWindow.addEventListener('foo', function(data)
{
var name = data.name
};
No comments