Quantcast
Viewing all articles
Browse latest Browse all 8068

Error building simple app in Blackberry 10.2.1

Hello,

I'm trying to build a simple mobile application in Blackberry using Titanium SDK 3.2.2GA.

The following error occures when the app launches on device (Blackberry 10.2.1):

![app error on Blackberry device 10.2.1] (file:///home/irina/Developer/blackberryerror.jpg "blackberryerror")

I asume that Titanium doesn't create the js file(ApplicationWindowPlatform.js) for blackberry too, as it does for the other platforms. This is the directory's content which titanium creates for blackberry

![blackberry directory content] (file:///home/irina/Developer/blacberrydirectory1.png "blackberryerror")

and the code provided in ApplicationWindow.js

// Load the platform specific UI.
    var ApplicationWindowPlatform;
    if (Ti.Platform.osname == 'mobileweb') {
        // Work around missing platform-specific require feature in Mobile Web.
        ApplicationWindowPlatform = require('mobileweb/ui/ApplicationWindowPlatform');
    } else {
        ApplicationWindowPlatform = require('ui/ApplicationWindowPlatform');
    }
    ApplicationWindowPlatform(self, webView, titleBarOn, drawerOn);
 
    return self;
The Titanium 3.2.1's default HTML5's based application contains a simple webview within a window.

So, I added a js file in blackberry's directory with a simple function. The error was gone but the webview doesn't show up and the document's title is undefined.

function ApplicationWindowPlatform(/*TiUIWindow*/self, /*TiUIView*/webView, /*boolean*/titleBarOn, /*boolean*/drawerOn) {
 
     if (titleBarOn) {
        // When the webview loads, set the title
        webView.addEventListener('load', function(e) {
            self.title = webView.evalJS('document.title');
        });
 
    }
}
 
module.exports = ApplicationWindowPlatform;
Any idea why all this is happening? Thank you.

BlackBerry SDK installed for titanium is 10.0.10.822


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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