Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-155] Custom Events on current window

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:52:10.000+0000
Affected Version/sn/a
Fix Version/sRelease 0.7.0
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:24:28.000+0000
Updated2011-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 
};

Comments

No comments

JSON Source