Custom menu item

Hello world

I wonder what are the settings to use in

super("Some text here", priority, ordinal);

to get this line above the custom point Menu as it is above to "shut up" by default?

I guess you do not want to use super, but the constructor of the MenuItem class.

the narrow question has a fixed ordinal, you can call super.makeMenu and check its elements to it, I think it was about 2600000.

Read also
http://www.slashdev.ca/2008/05/07/MenuItem-Demystified/
to better understand the menus.

Tags: BlackBerry Developers

Similar Questions

  • dynamically create and destroy the custom menu item

    I have a standard TestStand platform that I use on multiple systems.  On some systems, I have a few sequences of calibration and I would like to have the Update menu to have the RunSequence of these sequences of calibration.  I know how to manually create these menu items, but they are no longer valid for some sequence files.  I would use the sequence SequenceFileLoad to dynamically create menu items and the SequenceFileUnload to destroy these menu items.

    I've played around with the API, but cannot determine the correct path to get to the create and destroy the custom menu items.  Does anyone know how this can be done?

    Thank you

    Matthew

    Yes, see the online help for the members of the following APIs:

    Engine.GetEditTimeToolMenuItems

    EditTimeMenuItems

    EditTimeMenuItem

    Basically, you get a collection of tool using Engine.GetEditTimeToolMenuItems () menu items and then call EditTimeMenuItems.Insert () or EditTimeMenuItems.Remove (). If you insert a you get returns an EditTimeMenuItem object on which you can change the settings.

    In addition, since it has an expression to hide items in menu tool, you need not necessarily to destroy, you can hide them instead.

    Hope this helps,

    -Doug

  • Getting context object null when using the custom menu item.

    Hi all

    I implemented a sample application to add menu item custom to the list of messages and we test this build on 9000 os 5.0.0.41 Blackberryy 1

    On BB 9000, we have 2 message inbox, A like Blackberry by default message inbox and B as long as the Inbox for the e-mail account, I have set up on BB 900.
    I implemented the menu custom application to add menu on the message list option.
    I see this option on both my inbox, the question that I am facing is when I click on the menu item by selecting the email in the message of default A Blackberry inbox I can get the context object were like when I click on the same message next to the Inbox B I'm always get the context as a NULL object.

    Below is the code I used to add the custom menu item.

    Public Shared Sub main (String [] args)
    {
    If (args! = null & args.length > 0) {}
    call from another entry point. Add menu items mark as Spam and mark as suspects.
    {if(args[0].) (Equals ("GUI"))}
    try {}
                            
    create menu items.

    MyMenu ApplicationMenuItem = new EmailFile();
    Add the menu item in the list view and send by e-mail.
    Amir ApplicationMenuItemRepository = ApplicationMenuItemRepository.getInstance ();
    amir.addMenuItem (ApplicationMenuItemRepository.MENUITEM_MESSAGE_LIST, mymenu);
    } catch (Exception e) {}
    Utility.debugLog (try (), CLASSNAME, 'hand', Utility.EXCEPTION_INFO);
    System.out.println("Error:"+e.ToString());)
    }
    } else {}
    show on the application of spam...
    AppMain _theApp = new AppMain();
    _theApp.enterEventDispatcher ();
    }
    } else {}
    show on the application of spam...
    AppMain _theApp = new AppMain();
    _theApp.enterEventDispatcher ();
    }
    }

    Can we know what is the problem in my code or something I'm missing.

    Thanks in advance.

    Navneet Gupta.

    application menu items have been bugged for ages. There is nothing you can do except change your workflow. in some cases, you can recover the app screen and trying to extract something of these fields, but becomes more difficult in the new OS versions because of custom fields used by rim.

  • Cannot create the custom menu item

    I feel that I'm missing something simple here.  Use the examples in the documentation for the BB developer, I am unable to get a custom menu item is displayed on a BB application menu in a simulator.

    More precisely:

    I copied the code for ContactsDemo (on page 31 of the PDF Advanced Developer) subjects, and works very well in the Simulator.

    I then copied the code for DemoAppMenuItem (from page 86 of the same doc).  It seems to work very well - no errors, and it appears in the Downloads folder on the Simulator.  But no custom menu item appears on the simulator when I create a new Contact, and then return to view it.

    I have all three options checked in Workspace Blackberry > Blackberry JDE > Code signing.

    My environment is:

    Eclipse 3.4.2

    BlackBerry JDE plugin 1.0.0.67 Eclipse

    I tried it with two simulators 4.5 and 4.6.

    Any suggestions are greatly appreciated!

    Thanks for the references page - this is a great compilation of resources!

    I don't know why the sample code of the documentation of EDGE does not work, but I was able to get the custom display menu item using the code I found this message on the forum.

  • Add a logo image to a custom menu item

    I created a new custom menu item 'Export' in adobe illustrator CS6.

    What I want to know is that is it possible to add a small logo along the side of the 'Export' text on this menu item in adobe illustrator CS6 as below next to the opening, printing etc..

    ss.png

    Without going through the SDK. You might be able to hack one using platform-specific menu calls, but I do not think that the SDK has something to help you map their handles for menuitem to the menu system handles.

  • Custom menu item at the request of Message: two questions

    I try to add a custom menu to the Blackberry message request and get two questions:

    1. When you click the custom menu, the "Application.getApplication () .requestForeground (); method call does not call the main() method of my application "DemoMI".
    2. If I changed the method of

    Application.getApplication () .requestForeground)

    TO

    ApplicationManager.getApplicationManager () .runApplication (app); Where app is the "DemoMI" application descriptor

    Will be called the main() method. However, how can I make the subject of the Message around in the method "run" for the application "com.demo.DemoApp"?  I tried to use a static variable 'mi ContactsDemoMenuItem', but I've always had "null" value when the "main()" is called.

    My environment:

    • JDE: 4.2.0
    • Feature: Pearl 8100 with OS 4.2.0
    import net.rim.device.api.system.*;
    import net.rim.device.api.ui.component.Dialog.*;
    import net.rim.blackberry.api.menuitem.*;
    import net.rim.blackberry.api.pdap.*;
    import javax.microedition.pim.*;
    import net.rim.blackberry.api.mail.Message;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    
    public final class DemoMI extends Application
    {
        private static final String ARG_LAUNCH_CONTACT_DEMO = "1";
        private static  ContactsDemoMenuItem mi;
        public static void main(String[] args)
        {
            if(args == null || args.length == 0)
            {
                DemoMI app = new DemoMI();
                app.enterEventDispatcher();
            }else
            {
                String appToLaunch = args[0];
                if(ARG_LAUNCH_CONTACT_DEMO.equals(appToLaunch))
                {
                   new com.demo.DemoApp(mi.getMessage()).enterEventDispatcher();
                }
            }
        }
    
        DemoMI()
        {
            long locationToAddMenuItem = ApplicationMenuItemRepository.MENUITEM_EMAIL_VIEW ;
            ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance();
            ApplicationDescriptor app = ApplicationDescriptor.currentApplicationDescriptor();
    
            app = new ApplicationDescriptor(app, new String[]{ARG_LAUNCH_CONTACT_DEMO});
            mi = new ContactsDemoMenuItem(app);
            amir.addMenuItem(locationToAddMenuItem, mi);
            System.exit(0);
        }
    
        private static class ContactsDemoMenuItem extends ApplicationMenuItem
        {
            ApplicationDescriptor app;
            Message msg;
            ContactsDemoMenuItem(ApplicationDescriptor app)
            {
                super(20);
                this.app = app;
            }
    
            public String toString()
            {
                return "My Menu Item";
            }
    
            public Message getMessage()
            {
                return msg;
            }      
    
            public Object run(Object context)
            {
                if ( context instanceof Message )
                {
                    msg = (Message)context;
                    try
                    {
    
                        Application.getApplication.requestForeground();
                        //ApplicationManager.getApplicationManager().runApplication(app);
                    }catch(Exception e)
                    {
                        e.printStackTrace();
                    }
    
                 } else
                 {
                    throw new IllegalStateException( "Context is null, expected a Contact instance");
                 }
                 return null;
            }
        }
    }
    

    What you see is the expected behavior.  The ApplicationMenuItem runs in a different process where your application was run.  You have two options.

    You can store the subject of the Message in the RuntimeStore when the ApplicationMenuItem is called.  Your application you are undertaking could then read the subject of the Message of the RuntimeStore.

    Or you can create an application based on the drawing below:

    How to allow - a listener in the background to detect and update a GUI application
    Article number: DB-00406

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800783/How_To _...

  • Custom Menu items are not displayed

    With the help of LV 8.5, I want to change my VI by program menu bar.  I'm not using Edit > Run-time Menu...

    I deleted almost all menu items by default ('File', 'Edition', etc) except "Help", and then inserted my own menu 'Config '.

    In the IDE, it works fine; When I make an executable from my menu does not appear.  Instead, the default items

    I deleted have indeed disappeared, and the only point is "Help".

    What I am doing wrong?  I looked at positions where it says add an element name and the element tag and I looked at all the

    Examples of LV for adding a menu.  Things are fine until I build the executable and then my little menu item just does not appear.

    There is no reason why I couldn't use Edit > run Menu... but I thought I could do it programmatically.  Just trying to understand what causes my menu to not appear.

    Now that I see your code, it makes sense. The reason why it does not work the way you had it before, it is that you are actually getting an error when you run the application. The error is because not all of these menus actually exist in the runtime environment. Thus, the function to delete the Menu items generates an error, and the rest of the code is bypassed. The example removes simply all of the menus, and no error is generated, since only the menus that actually exist get deleted.

  • Creating custom menu item

    Hi guys,.

    I am creating a menu item in the main menu of InDesign. Is this possible with *.jsx?

    The idea is to have the menu as follows: file | Change | Page layout | MyMenuGroup | Type of...

    Thank you!

    Insert this code into a startup script:

    try {}

    companyMainMenu=app.menus.item("$ID/Main").submenus.item ("company name");
    companyMainMenu.title;
    } catch (e) {}
    companyMainMenu=app.menus.item("$ID/Main").submenus.add ("company name");
    }
      
    var Script1 = new queue (SCRIPTS_PATH + "Configure.jsx");
    var ScriptAction1 is app.scriptMenuActions.add ("Configure");.
    var EventListener1 is ScriptAction1.eventListeners.add ("onInvoke", Script1, false);.
    var utilesScriptMenuItem1 = companyMainMenu.menuItems.add (ScriptAction1);
      
    var sub-menu; First level submenu
    try {}
    SubMenu = companyMainMenu.submenus.item ("submenu 1");
    SubMenu.title;
    } catch (e) {}
    SubMenu = companyMainMenu.submenus.add ("submenu 1");
    }
    var submenuScript1 = new File (SCRIPTS_PATH + "Action.jsx");
    var submenuScriptAction1 = app.scriptMenuActions.add ("Action");
    var submenuEventListener1 = submenuScriptAction1.eventListeners.add ("onInvoke", submenuScript1, f alse);
    var submenuScriptMenuItem1 = SubMenu.menuItems.add (submenuScriptAction1);

  • How - add a menu item custom application BlackBerry

    I'm working on an application that creates a custom in various standard Blackberry applications menu item.
    On the platform of v4.2.1.72 8800 2.3.0.54 everything works fine all the Blackberry PIM application that the spectacle of my menu item mail application custom.

    When I load on platform 8330 v4.3.0.124 3.1.0.71 none of the custom menu to the top and on the OS of the Pearl Flip is v4.6.0.48 4.1.0.13 only e-mail and todo/tasks application view my custom menu others do not show my menu item.

    I tried to compile my app in the various versions of the JDE, but always the same question.

    Am I missing something for the new OS?  I followed the knowledge base article "how - to add a custom BlackBerry application menu item.

    I tested it on 8800 v4.5.0.52 platform 2.7.0.66 and Mail and Memo shows no custom menu item in Contacts, calendar and ToDo my custom menu appears.

    Thank you...

    BTW do you know if I can add menu browser and retrieve the content of the web page?

    No, this is not supported.

  • JavaScript: create menu buttons how custom toolbar items in the designer?

    Hello!

    Is it possible to create custom menu items or toolbar buttons in the ADEP/LiveCycle Designer?

    Thanks for the tips!

    Marcos

    Generally no,.

    but since the Designer ES2, you can create macros to simplify your workflow.

    These macros can be brought in the Tools menu.

    Here's a few macros that I did the Designer ES2 RPF / designer of the ADEP:

    http://thelivecycle.blogspot.com/search/label/macro

    For more databases on the macros to read the blog of John Brinkman.

    http://blogs.Adobe.com/formfeed/category/macros

  • Elements of custom Menu Application

    Hello

    From a configuration file, I'm giving the user the ability to add and remove Menu items which would appear on a native BlackBerry Application Java, for example calendar, Contacts etc. It's all the dory hunky, adding menu items to the repository and the native application, but without a reference to the original object (which I think is garbage collected and stored somewhere in the depths of the BB database), I can't remove the added custom Menu item previously. (tried static member variable, and overwrite the previous text to menu items, just appears as a value that is duplicated in the menu)

    I read forums and manuals and the API extensively, but I did not yet find a solution.

    I read people who come on this issue, if there is a plausible solution, could you give a shout!

    See you soon,.

    Nik.

    If you want to remove an ApplicationMenuItem, you must keep a reference to the real menu item that you have added and use this reference to remove.  I find the best place for this is RuntimeStore.

    BTW do not know if you do this available to old BlackBerry OS, but even if you do this, the removal does not work under OS 4.0, but the fact in the latest OS.  Sorry not tested prior to OS 4.0.

  • How to add the menu item in the context menu of the Gallery

    Hi all

    I am new bie BlackBerrry development. Does anyone know how to add a menu item in the context menu of the BlackBerry Gallery. In other words, when I am browsing photos in the Gallery, click on the menu, there will be a configurable option so that my request will be executed when I select this item.

    Thank you
    TuanSandman

    See this article.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800367/How_To _...

    Check the class ApplicationMenuItemRepository for applications where you can add the custom menu item.

  • debugging automatically when you call a script of a menu item

    Hi all

    I just came across a question I was wondering if anyone can help me or point me in the right direction.

    I have two startup scripts.

    Some custom menu items and actions that call a few other custom scripts running in the 'session' and ups configurations target engine.

    The other runs in my own custom session and is used to initialize and share common constants and functions between my custom scripts.

    This all seems to work as expected and by clicking on the new menu item calls, the correct script however, even without the ExtendedScript Toolkit running as soon as I click on the menu item, it will load the ESTK and break on the first line of the script. If I press F5 to continue the treatment, it will end and works very well.

    I use currently the package has excellent (http://extendables.org/) to make some HTTP and simplify the creation of the user interface that does not specify a session.

    Nobody knows what causes the scripts to debug automatically or is there a setting that can be defined to cause this?

    This is caused by the 'session' calling 'customSession' using the code that runs in the 'main' session by default?

    This really is irritating me at the moment so if anyone can help it would be much appreciated.

    All this is done using JavaScript in InDesign CS 5.5

    Thanks in advance

    followed a line in the package has:

    level of $ = 2;

    I then went on the extensible site on github to raise what a problem only to find out someone had already pointed out, I didn't see the question before. DOH!

    Anyway thought i better update incase someone else on the forums try to use the package and meet this Issus.

  • How to add custom context menu menu items?

    How to add custom context menu menu items?

    through c++ sdk

    Hi Philippe,.

    to display a context menu you just replace the path of the menu. For example if you have a menu ' hand: & Layout: MyMenu "you can add it to the context menu"RtMouseLayout:MyMenu"in your MenuDef resource in the file en with the ActionID of your ActionComponent.

    Markus

  • Add the Menu item to default custom Blackberry file browser

    Hello

    I try to add the Menu item by default Blackberry file browser.

    I want to add the menu item 'PRINT' files. It is when I browse through the media-> Explore-> photo, we get a list of images and when clicked on the Menu. I expect the element menu to print it.

    I use ApplicationMenuItemRepository to achieve this. And the documentation says.

    MENUITEM_FILE_EXPLORER
              ApplicationMenuIteminstances registered with this ID appear when the file Explorer application is running.

    MENUITEM_FILE_EXPLORER_BROWSE
              ApplicationMenuIteminstances registered with this ID appear when a user uses the Windows Explorer application to browse files and folders.

    MENUITEM_FILE_EXPLORER_ITEM
              ApplicationMenuIteminstances registered with this ID appear when a user uses the file Explorer application to open a file.

    Whence this Explorer of files mentioned in the CIHI means. I added the Menu item in the browser, and I could see the IMPRESSION here. But I don't know where this IMPRESSION would be visible IF we add the menu item to one of them.

    Thanks in advance.

    Provision ApplicationDescriptor solved my problem.

Maybe you are looking for

  • can't get music to apple tv on iTunes

    Cannot get music of teeth for apple tv

  • slight delay

    It drives me crazy and cut half my productivity! Whenever I click my mouse or something to move the rotation beach ball appears for a few seconds. It does in each particular program in Adobe Illustrator CC 2015 which is my main work programme. It can

  • Media Player rename my files

    I use Media Player to rip music which I then transfer to the device that I use to listen to music on. (I.e. I do not use media player and laptop computer for playback) Usually, I rename the files ripped and sometimes the name of the album folder. I d

  • Problems streaming to the PC with Windows 8.

    Hi all I had a domestic network set in place on my PC running windows 7 and have been streaming videos from my PC to my WD Live with no problems. I have recently upgraded to Windows 8 and have put up the network with the same settings. My WD Live can

  • Video of gameplay out of sync with cam face and acoustic Bandicam in first?

    So I have a video of 5 nights at Freddies and then a video on a device separate from my face, and no matter where I line up my gameplay, it may be just out of sync with the video. I compared the original video with the video after that its exported f