BBUI.js actionBar and actionMenu
Results 1 to 7 of 7

Thread: BBUI.js actionBar and actionMenu

  1. #1
    Tobster's Avatar
    Tobster is offline BlackBerryOS Friend Follow Tobster On Twitter Add Tobster on Facebook Add Tobster on Google+ Add Tobster on Linkedin Visit Tobster's Youtube Channel
    Join Date
    Jan 2013
    Location
    Bristol, UK
    Device
    Z10
    OS
    10.2
    Carrier
    O2 UK
    Posts
    20
    Liked
    2 times

    BBUI.js actionBar and actionMenu

    Hello,

    I have already created my app (A currency converter) using HTML5 WebWorks and everything works fine but what I'm really looking for is 'the native blackberry look-and-feel' that BBUI.js offers. The problem I'm having is where to I put the code needed to create an actionBar and an actionMenu with sharing options within my index.html file or my home.html file (This is my first page that gets loaded on opening). I'm having this problem because I didn't really understand the tutorial in the github wiki and when I follow the tutorial at opensourcebb


    and run the app in Ripple Emulator no pictures are shown much like in the image that I have attached.

    BBUI.js actionBar and actionMenu-actionbar.jpg

    I'm also looking into creating an update function and linking the code to a server or using an api to retrieve exchange rates (so that I don't have to do it manually when the rates change)

    [If needed I will attach my .zip file of my whole application incase someone can help]

    Any help would be very much appreciated.

    Thanks in advance!




  2. #2
    John Reid's Avatar
    John Reid is offline Editors Follow John Reid On Twitter Add John Reid on Facebook Add John Reid on Google+
    Join Date
    May 2012
    Location
    Margate, UK
    PIN
    24EF084D
    Device
    Z10 STL-2
    OS
    Z10 100-2 / 10.0.9.2
    Carrier
    O2 UK
    Posts
    297
    Liked
    40 times
    The best thing you can do is look at the sample app included in the bbui.js files.

    However, to keep things simple I've taken the sample app and stripped out everything except for the actionbar code so that you can see what's going on more clearly.

    Hopefully you'll find it useful. Download and run in the Ripple Emulator and you should see a working action bar.

    bbui_actionbar.zip
    Joe Jerde likes this.

  3. #3
    Tobster's Avatar
    Tobster is offline BlackBerryOS Friend Follow Tobster On Twitter Add Tobster on Facebook Add Tobster on Google+ Add Tobster on Linkedin Visit Tobster's Youtube Channel
    Join Date
    Jan 2013
    Location
    Bristol, UK
    Device
    Z10
    OS
    10.2
    Carrier
    O2 UK
    Posts
    20
    Liked
    2 times
    Quote Originally Posted by John Reid View Post
    The best thing you can do is look at the sample app included in the bbui.js files.

    However, to keep things simple I've taken the sample app and stripped out everything except for the actionbar code so that you can see what's going on more clearly.

    Hopefully you'll find it useful. Download and run in the Ripple Emulator and you should see a working action bar.

    bbui_actionbar.zip
    Thanks John I was just looking at it and I can understand what goes where now. Would it be possible for you to tell me what's going wrong in my app? As I have my original (actionBars do not work at all) and another one where another developer has slightly changed it for me so that the actionBars work, the only problem is I can't figure out how to get all of the actionBars to work, as when I go to index.html in ripple the actionBar & actionMenu will be there, but when I click on one of my tabs at the bottom it goes to the page, but the page doesn't have any actionBars. Another thing I was looking to do was have my currency.js file separate, this being a currency converter app so I could upload it to a server and change the exchange rates there, instead of having to update the app all the time - the only problem with that is that when the currency.js file is separate the currency converter itself doesn't function, I have been stuck on this for almost a week now with little-to-no help from anyone. My app was ready to be put onto Blackberry World at that time also, but then I heard about BBUI.js 'the native look and feel' so I started on that and now I'm here very confused and barely any time left to get my app finished.

    [CurrencyConverter.zip is my original file and Currency.zip is the one that has been changed slightly by another developer]

    CurrencyConverter.zip db.tt/mvYpULmU
    Currency.zip: db.tt/0dQ7c4lc

    Any help would be appreciated!

    Thanks, kind regards

  4. #4
    John Reid's Avatar
    John Reid is offline Editors Follow John Reid On Twitter Add John Reid on Facebook Add John Reid on Google+
    Join Date
    May 2012
    Location
    Margate, UK
    PIN
    24EF084D
    Device
    Z10 STL-2
    OS
    Z10 100-2 / 10.0.9.2
    Carrier
    O2 UK
    Posts
    297
    Liked
    40 times
    Hi Tobster,

    I've got your downloads and will take a peek in the morning - it's about my bedtime here. I'll see if I can see anything obvious.

  5. #5
    Tobster's Avatar
    Tobster is offline BlackBerryOS Friend Follow Tobster On Twitter Add Tobster on Facebook Add Tobster on Google+ Add Tobster on Linkedin Visit Tobster's Youtube Channel
    Join Date
    Jan 2013
    Location
    Bristol, UK
    Device
    Z10
    OS
    10.2
    Carrier
    O2 UK
    Posts
    20
    Liked
    2 times
    Quote Originally Posted by John Reid View Post
    Hi Tobster,

    I've got your downloads and will take a peek in the morning - it's about my bedtime here. I'll see if I can see anything obvious.
    Thanks for this! If you notice anything, please reply to this thread or pm me tomorrow.

    Thanks again

  6. #6
    John Reid's Avatar
    John Reid is offline Editors Follow John Reid On Twitter Add John Reid on Facebook Add John Reid on Google+
    Join Date
    May 2012
    Location
    Margate, UK
    PIN
    24EF084D
    Device
    Z10 STL-2
    OS
    Z10 100-2 / 10.0.9.2
    Carrier
    O2 UK
    Posts
    297
    Liked
    40 times

    Lightbulb

    OK,

    First of all the index.html should be opening menu.html not menu.htm. As such I was getting a 404 error before I started.

    The main problem with your HTML code is that the tags aren't being closed properly. Every <div> should have a </div> etc. I'd strongly suggest making sure that you're using proper indentation to spot these problems.

    Secondly, the pages that are stacked onto the screen should not have <head> <body> or <html> tags - these are already present in your first page and don't need to be included again. Likewise, any scripts that are used at the start don't need to be called again unless they are procedural.

    I've commented out a lot of code in your menu.html file so that you can see where I've cleaned up the code for you, but there is still a lot to do. Make sure that if you're copying and pasting code, you ensure that it all still fits. Do a small bit at a time, test, then a bit more.

    Even the original code that you're using had a lot of unclosed tags in, and unfortunately this can easily break frameworks like bbUI as it simply doesn't know where it should be looking to find the right elements.

    Anyway, take a look, carry on, and good luck with your app

    menu.zip

  7. #7
    Tobster's Avatar
    Tobster is offline BlackBerryOS Friend Follow Tobster On Twitter Add Tobster on Facebook Add Tobster on Google+ Add Tobster on Linkedin Visit Tobster's Youtube Channel
    Join Date
    Jan 2013
    Location
    Bristol, UK
    Device
    Z10
    OS
    10.2
    Carrier
    O2 UK
    Posts
    20
    Liked
    2 times
    Quote Originally Posted by John Reid View Post
    OK,

    First of all the index.html should be opening menu.html not menu.htm. As such I was getting a 404 error before I started.

    The main problem with your HTML code is that the tags aren't being closed properly. Every <div> should have a </div> etc. I'd strongly suggest making sure that you're using proper indentation to spot these problems.

    Secondly, the pages that are stacked onto the screen should not have <head> <body> or <html> tags - these are already present in your first page and don't need to be included again. Likewise, any scripts that are used at the start don't need to be called again unless they are procedural.

    I've commented out a lot of code in your menu.html file so that you can see where I've cleaned up the code for you, but there is still a lot to do. Make sure that if you're copying and pasting code, you ensure that it all still fits. Do a small bit at a time, test, then a bit more.

    Even the original code that you're using had a lot of unclosed tags in, and unfortunately this can easily break frameworks like bbUI as it simply doesn't know where it should be looking to find the right elements.

    Anyway, take a look, carry on, and good luck with your app

    menu.zip
    Thanks for looking at this for me, unfortunately I cannot finish the app with BBUI.js as I have very little knowledge with it. Therefore, unfortunately, I will have to go back to how I had it before

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •