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

Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Enyo 1.0, how implement menu swipe

[ Edited ]

Hello all. Few days ago I started porting one old app from HP TouchPad to PlayBook. It's completelly written in Javascript and enyo 1.0 and with small modifications (without rewriting the whole code from scratch, just adding the whole enyo 1.0 framework to project, modifying paths to js files) and surprizingly it "works". Only date and time is f*cked up - showing NaN instead of real date/time (I think it's enyo.g11 locale problem, or wrong formatting), but I'll solve is somehow.


The real problem is, I want to enable swipe menu option to show small setting menu for the app. It's already implemented in enyo, just need to pass control from bb swipe event to enyo code. 

Somebody worked on this issue ? Fell free to post any comment, suggestion etc





Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Enyo 1.0, how implement menu swipe

Hello borceg,


Have you had a chance to look over the swipemenu.js implementation on Github?



It highlights how to detect the navigation swipe and from there you can leverage as much as the actual menu design as you like or potentially stick with your enyo implementation.


Erik Oros

BlackBerry Development Advisor

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Enyo 1.0, how implement menu swipe

Regarding the swipedown, there is nothing special to it. It's a simple matter of listening to that event to call your menu revealing routine. Should take you 5 minutes to get the call from the doc and to paste it in your code.

And regarding the NaN, it's a PlayBook problem, you need to format dates in a way that it understands. Try something like myDate = new Date(theDate).format('U');
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Posts: 15
Registered: ‎02-07-2012
My Device: BlackBerry PlayBook
My Carrier: AT&T

Re: Enyo 1.0, how implement menu swipe

This is very helpful. It works with Enyo 2.0, too.


HOWEVER, I need to implement doButton in my index.html.  What if I want to access a function within my .js that I load from the index.html.  If my callback is a simple function, swipemenu.js looks for the callback function in my index.html, not within my Enyo kind.  If I use this.$.doButton as the call back, the menu loads correctly, but does not trigger the function when a button is clicked.


What am I doing wrong?