I got the following error while firing an application event from Titanium window to a local html page. Would you please help to see why Titanium can't recognize Ti.App?
Titanium 2.0.2 IOS 5.0
[WARN] load web view [WARN] <null> [WARN] Exception in event callback. { line = 63; message = "'undefined' is not an object (evaluating 'Ti.Api.fireEvent')"; name = TypeError; sourceId = 242645728; }Here's the code
var self = new ui.View({ width: 300, height: 200, left: 10, top: 10, borderRadius: 5, layout: 'vertical', backgroundImage: '/images/gradient.png'} ); var loadWebView = function() { Ti.API.warn('load web view'); Ti.API.warn(Ti.Api); Ti.Api.fireEvent('app:loadWebView'); Ti.API.info('web view loaded'); }; var button = Ti.UI.createButton({ title: 'fromTitanium', height: '50dp', width: '130dp' }); button.addEventListener('click', function(e) { loadWebView(); }); self.add(button);Thanks a lot