Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (ti.app)
Viewing all articles
Browse latest Browse all 15

Why Titanium can't evaluate Ti.App?

$
0
0

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

Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>