11-10-2011 01:11 AM
I'm creating a menu item:
var regPush = new blackberry.ui.menu.MenuItem(false, 1, "Push Registration", openBISPushListener()); blackberry.ui.menu.addMenuItem(regPush);
But openBISPushListener() is being called during this menu item instantiation. When I comment out the menu item lines, the code isn't called.
Solved! Go to Solution.
11-10-2011 06:50 AM
The problem is that you are defining and at the same time executing the callback function for your menuItem.
Please see if attaching the callback method works for you :
var regPush = new blackberry.ui.menu.MenuItem(false, 1, "Push Registration", openBISPushListener);
Notice that I just removed the () on your openBISPushListener.