Add items to menu in webworks app - blackberry-webworks

I was wondering how I would go about adding items to the menu that appears when the blackberry button http://jennontech.files.wordpress.com/2012/10/blackberry-logo.jpg is clicked. Thanks to anyone who can help. Btw, I am making an app for blackberry 7, if that helps.

The easiest way to approach this is to have a look at the menu sample for WebWorks available at http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Adding-Menu-Items-using-the-BlackBerry-WebWorks-SDK/ta-p/516885
If you want to understand deeper the API this is the page you should look at:
https://developer.blackberry.com/bbos/html5/apis/blackberry.ui.menu.html
A quick overview is:
1. you create the menu item
var reloadButton = new blackberry.ui.menu.MenuItem(false, 0, "Refresh", reloadPage);
2. you add the reloadButton item menu to the context menu
blackberry.ui.menu.clearMenuItems();
blackberry.ui.menu.addMenuItem(reloadButton);
That's it! You can optionally specify which menu item is the default one with
blackberry.ui.menu.setDefaultMenuItem(reloadButton);
Check out the API page for more details.
As a reminder, the ideal place to get the BlackBerry experts support for your queries is the BlackBerry forum http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/bd-p/browser_dev

Related

How to develop a menu where the current route remains laterally to the menu

I am new to developing apps flutter, but I want to develop a menu where the current tab is sample within the menu itself, I do not know how to explain, and if it is possible, but could not find a similar tutorial and do not know if there is any specific name for this type of menu, could someone help me with this?
It would be something in the style of this design ... but in my case just show the current page there, is possible in flutter?
You can use this package https://pub.dev/packages/hidden_drawer_menu
github https://github.com/RafaelBarbosatec/hidden_drawer_menu
full example code https://github.com/RafaelBarbosatec/hidden_drawer_menu/tree/master/example
or https://pub.dev/packages/kf_drawer
github https://github.com/qqmikey/kf_drawer
hidden_drawer_menu
kf_drawer

Breadcrumb doesn't work on a component I created (Joomla!)

I'm learning how to use Joomla! 3.2
I created a new component, then I added it to my main menu,
Here are the only parameters I changed in the main menu:
But now when I go to my new component the breadcrumb doesn't work correctly, there's only the home button and when I click on it I'm redirected to the same page:
Did i missed something very important? How can I fix it? The breadcrumb works on every other pages.
Ok I found the problem, I forgot to add this
$pathway = $app->getPathway();
$breadcrumb = $pathway->setPathway(array());
$pathway->addItem( JText::_( 'COM_PARTISPOLITIQUES' ),JRoute::_('index.php?option=com_partispolitiques&view=partispolitique'));
$pathway->addItem( "Current page name",'');
In the file view.html.php located in my component folder...
I am going to assume you are using the Helix template as it seems to be a common oversight.
Make sure that Enable Page Title is enabled from your menu Helix Page Title tab.
If not, please advise as to what template.

Which Context Menu Item Clicked

I am trying to develop a ios application. I could get the context menu up and running in few minutes.
Now to scale the context menu feature, I want to make UIMenuItem hold the information about it action, I wrote a class.
ExampleMenuItem : UiMenuItem
#private int action
Now the problem is as I generate MenuItem dynamically and specify only one selector in action menuItemClicked: , I am unable to know which MenuItem is being clicked to get the relevant action information.
Any idea would be appreciated. I tried enough of Google and Stackoverflow searching before writing this post.
Thanks
Hemant Verma

avoid chrome popup extension to close

Is there a function that allow me to select text when the extension
stays open. Normally when I Use the extension popup and I Click outside the
extension the extension close. Is there a wat to avoid this.
Thank you so much
Unfortunately there is currently no way to keep the popup open once you focus out of it. This is by design.
If you would like to always show something while interacting with the page, perhaps the experimental Info bars or even Desktop Notifications would work?
Hope that helped!
The only way to keep it open is to right click over the extension icon (button) and select "Inspect popup" the extension popup then show up and remain open but of course the debugger window show and this not a fix obviously still it will maybe inspire a hack... if someone is skilled enough and share the solution with all of us.
I encountered the same problem and I've thought of a possible solution (though not tested it):
Use your background.html to store the content of the popup action and upon loading the popup, you fetch the content via the default messaging for chrome extensions.
When doing all kinds of other stuff, like XHR's or something, I think you should do that in background.html too, so the requests won't abort if you close and you can do something with the result. Then when a user re-opens the popup, he'll see the result of his previous action instead of the default screen.
Anyone tried something like did already?
As far as I know you can't persist a pop up menu but my workaround has been using a content script to append a menu on page load. After the menu is appended you can toggle the menu via messaging between the background script and the content script.
If you want to encapsulate the menu from the page it's deployed on you could wrap your menu in an iframe. This could add complexity to your project since you would have to deal with cross origin issues and permissions.
There is an alternative hack for this. You can make use of chrome local storage to store the metadata as needed. Upon restart you can read that metadata and render the desired content. You will also probably clear that metadata after you have completed performing the operations based on that.

iphone maps help needed

I need you help. I saw one application myhomes for iphones. link for that app is from myhomes.com. they are using map in which markers are there when you click on marker one button is displayed(that is really a thaught for me how to disply a button in objective c when we click on marker in webview because there we might using javascript ). that will redirect to other screen which displays details of that event. I want to use that kind of functionality in my code. they might be using some api. I am very eger to know how they are doing that. rite now i am displaying map with google map javascript and displaying pop of when we click on marker. but that pop up is non clickable as it is of html type. how can i put a button on my uiview at the same position where my marker is ? how to combine objective c with javascript ? i know most of the developers might aware of this. please try to help me. that will be a great appreciation.
hopefully looking for the answers ...
Thanks a lot
Please see the MapKit component documentation included with the iPhone 3.0 SDK.