Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 2
Registered: ‎03-26-2014
My Device: Z30
My Carrier: Rogers
Accepted Solution

How to implemented bbui.js extenation within webworks 2.0

So I am having a hard time implementing the BBUI.js using webworks 2.0. 

 

I downloaded it from.  https://github.com/blackberry/bbUI.js  Now the instructions are not very clear on how to install.  I managed to find the REadme file within the pkg\bb10 folder.  So it says for installing the bbui.js webworks extension to go to C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK a.b.c.d_

 

So on my PC that is C:\Program Files\BlackBerry\BB10 WebWorks SDK 2.0.0.71.  

 

Next the instructions say:  "In this directory you will find a **Framework\ext** directory.  Simply create a **bbui** sub directory and copy all the contents from the above **ext** directory
into your new sub directory.  It will end up looking like the following:

```
Framework
   \ext
       \bbui
          - client.js
          - index.js
          - manifext.json
```
"

 

Howerver ther eis no Framework\ext directory.  How did others implement the bbui.js webworks extension within 2.0.

 

Thanks in advance.

 

New Contributor
Posts: 2
Registered: ‎03-26-2014
My Device: Z30
My Carrier: Rogers

Re: How to implemented bbui.js extenation within webworks 2.0

Figured it out.  Appeartly lots of the docs have not been updated for 2.0.

 

http://developer.blackberry.com/html5/documentation/v2_0/coding_differences.html

 

We should be using cordova.js instead of webworks.js

 

<script src="local:///cordova.js" type="text/javascript" ></script>

 

And not webworksready but deviceready

 

  document.addEventListener("deviceready", function(){
      alert("Im in web works ready function");
      });

 

Well atleast this post is out there for anyone new to Webworks 2.0 and ran into the same issue I did.

 

Cheers!