07-13-2012 02:25 PM - edited 07-13-2012 02:31 PM
With this post I like to share an experience which I made today.
I'm developing an application that should work on BB6+, Playbook and BB10. In this app I implemented a menuBar with only one menu-item 'Options'.
The menu works in BB6
The menu works in Playbook
The menu doesn't works in BB10 (I don't know why, but I will figure it out)
I use the Ripple Simulator Extension (0.9.5.0) for Chrome. Now, during testing the app with the BB10 Platform, I had a huge simulator device and therefore I changed the zoom settings in Chrome down to 33%. After a while, I switched the Platform back to Webworks-TabletOS (here I changed the zoom to 67%) and on the Console of the simulator the following message was printed:
Unable to create Blackberry/onSwipeDown menu.
#Aaaarg#
I was ABSOLUTELY sure, that I doesn't made any changes to the menuBar! I searched and screamed but it doesn't helped me. Now I started debugging and I found the peace of code in bbui-0.9.3.js who's responsible for this message:
bb.device.isPlayBook = (navigator.appVersion.indexOf('PlayBook') >= 0) || ((window.innerWidth == 1024 && window.innerHeight == 600) || (window.innerWidth == 600 && window.innerHeight == 1024));During creating the menuBar in bbui-0.9.3.js 'bb.device.isPlayBook' must be true, otherwise 'Unable to create....'. If you change the zoom in Chrome, the window.innerHeight and window.innerWidth does not match the values for setting 'bb.device.isPlayBook' to true! For my test's, the zoom in Chrome must be set to 75%.
On a real device, no problems!
So, avoid changing the zoom in Chrome OR remember to turn back the zoom if developing using the Webworks-TabletOS platform.
07-16-2012 10:05 AM
To clarify what you are saying, if you change the zoom level in Chrome, the emulated screen resolutions of the BB10 device profile within Ripple changes?
Can you confirm this by loading the following test page in Ripple? Enable the BlackBerry 10 platform, and change the zoom level in Chrome. The screen dimension values should not change:
http://blackberry.github.com/WebWorks-Samples/kitc
Can you confirm what version of Ripple you are using?
07-19-2012 09:21 AM - edited 07-19-2012 09:25 AM
It's working now... I updated today again the bbui to bbui-0.9.3.js (github).
Ripple UI (v0.9.6) - Ripple Build & Deploy (v0.9.5)
Ripple-Framework: Ripple 0.9.5.0
The BB10 Menu is also working now, but only on my BB10Alpha device (and not on Ripple). I can't fire a swipe down event with Ripple when I use the BB10 Platform (there are only two events available: pause and resume)
Thanks Adam!