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.

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 tab menu

    Hello

    I am trying to create a 'Menu of the tab' as described in

    http://developer.BlackBerry.com/native/documentation/Cascades/dev/ios_porting/mapping.html

    I want to hide the tabs and actionbar and try to implement showing on the sliding tab menu to the right!

    I am able to hide the tab menu! But cannot hide the actionbar! Please help me with that! Also, I want to know if it is possible to load the menu tab by code?

    I think that's the problem you describe

    You've created a tabbed pane and have the tabs stored in the overflow but want to hide the whole action bar("tabbedPane").
    

    I'm not posotive, but I am not belive this is possible, because the action bar is now the tabbed pane is the default component, which allows you to switch between tabs.   I have not noticed all the apps that hide the pane tabs, and I did not belive it would be consistent with the user B4BB interface instructions either.

  • How to create the active Menu item

    I am trying to create a menu with this code item:


  • 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 _...

  • Empty Device Manager and for error message "cannot create the enumerated device root need to install Parallels paravirtualization pilot".

    Original title: Device Manager empty

    I have Windows XP Service Pack 3 installed in a Bootcamp partition on my Intel iMac. I can detect and install new hardware such as USB keys. However, the Device Manager window is blank - how can I get the window to display the devices connected to the computer? I am also unable to install Parallels tools when I use Bootcamp as a virtual machine. The error message "cannot create the 'root-enumerated device' necessary to install Parallels Paravirualization driver.

    Hey Harcjk,

    For your first question, go through this article.

    None of the items appear in the device list manager when you open
    http://support.Microsoft.com/kb/311504

    For the second question, here are some suggestions:

    Method 1: Uninstall & install Parallels tools

     

    NOTE: we highly recommend you make a backup of the virtual machine before you continue.

    a. start your virtual machine and cancel the installation of Parallels Tools Wizard.

    b. Click Start--> Panel--> Add / Remove programs and remove the Parallels tools in the list of applications.

    c. restart Windows.

    d. install the Parallels tools by clicking on the Virtual Machine--> install the Parallels Tools.

    Method 2: Uninstall antivirus software

    If the problem persists, try the following:

    Temporarily uninstall all the antivirus software to the virtual machine and repeat steps of the "Uninstall & install Parallels Tools" section above.

    Note: Don't forget to install the back antivirus software, once the problem is resolved.

     

    Method 3: Uninstall, clean & install Parallels tools

     

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following windows Help article.

     

    How to back up and restore the registry in Windows XP

    http://support.Microsoft.com/kb/322756

    a. If the problem persists, try the following:

    b. start Windows.

    c. go to "Start" > "Control Panel" > "Add/Remove Programs" and uninstall theParallels Tools if it is present.

    d. go to 'my computer' > 'C' drive > "Program Files" > "Parallels" folder and delete the "Parallels Tools" folder, if present.

    e. click the Windows 'Start' menu-> 'run' and type 'regedit'. Click OK.

    f. in the registry editor, go to "My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Parallels" and delete the heading "Parallels Tools" and go to "My Computer\HKEY_CURRENT_USER\SOFTWARE\Parallels" and remove the 'Tools' section.

    g. restart Windows.

    h. now install Parallels tools in the 'VM' menu on the Parallels Desktop menu bar, while Windows is running.

    I hope this helps.

    Kind regards

    Shinmila H - Microsoft Support

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • BB10: How to create a custom Menu

    Hello world

    I need to create a custom menu for BB10. That's how I want (see the two screenshos):

    • It must be a bar at the top of the screen. Just like a BB10 'Title Bar', it should have a title. But he must also have two buttons: one on the left of the bar and the other on the right of the bar.
    • When you press the left button, a custom tab menu appears to the left of the screen. It also has a title and a menu with icons and images/background color list.

    I don't know if it's possible to do that yet, but I heard that you can do this by using "Custom Control"s. I tried with "Glass in", "Application Menu", "Menu", "Action Menu" and 'Title Bar' but I think that none of them responds to what I need.

    Any idea?

     

    Thank you very much.

    Hello!

    I think that this is possible, but requires coding.

    Create the menu in a container offscreen, layout of the container the DispositionAbsolue value (you can specify x & y) and drag the container into the visible area with animation.

    Create title bar as a container with two ImageButtons and a label. Slide the container to the right.

    Or even use one container for menu and title bar, just create half of the items off the screen.

    When the positioning of the controls, you can use the device resolution in order to avoid hard-coding the values:

    DisplayInfo display;
    int displayWidth = display.pixelSize().width();
    

    Animations are created by combining the ParallelAnimation, the SequentialAnimation and the different transitions.

  • 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.

  • DBCA cannot create the database in 12 c in Windows

    Hello

    After the installation of Oracle 12 c on R2 Windows Server 2012 and successfully running the netca command to configure the listener, I run with the DBCA tool question

    It throws an error message of "Recovery Manager could not restore the data files"

    I looked at the log files, here is some information:

    Corrupt block 1 found during the backup piece, reading file=C:\ORACLE\PRODUCT\12.1\DBHOME_1\ASSISTANTS\DBCA\TEMPLATES\SEED_DATABASE. DFB, corr_type = 4

    Review of blocknum = 1, file=C:\ORACLE\PRODUCT\12.1\DBHOME_1\ASSISTANTS\DBCA\TEMPLATES\SEED_DATABASE. DFB, found the same corrupted data

    Not sure if this helps, but I am attaching several log files to help debug the problem.

    I read the post DBCA cannot create the database in 12 c, but it doesn't quite have an answer.

    Any help is appreciated.

    Thank you

    Pranav

    Looks like a bad installation or a bad block on your disk. Have you tried creative using the "Custom Database" model in the wizard dbca (one that does not come with the data files)? It will take more time to create, but shouldn't read the dbca reported as corrupted file

  • Drop menus appear on your mouse on the main Menu items?

    Sorry if this seems obvious, but I am new to Muse. After viewing all the tutorials I can't display the drop down menus on overview of the main menu items (to display submenu choice on the main categories page).

    There must be an easy way to do it. Can anyone offer advice?

    Thanks in advance.

    Hello

    If you have subpages created for top level pages and put you in a menu, while also changing the "Menu Type" to "All the Pages" in the menus, it should appear the submenus when you hover over the top level menu items. Here's a little video that I created to show you how it works: http://screencast.com/t/jEAhCpL8x

    I hope this helps.

    See you soon

    Parikshit

  • I can't create the custom toolbar

    Whenever I try to create the custom toolbar, it disappears after you restart Firefox. Can you suggest me a solution for this?

    Thank you!

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do not click on the reset button on the start safe mode window or make changes.

    What security (firewall, antivirus) software do you have?

    Some security software has virtualization or sandbox features that can cause problems to protect and restore files in the Firefox profile folder.

  • Satellite C55-A-1JL - 10 Windows sound driver - cannot create the instance of the APO

    Hello.

    I have Toshiba Satellite C55 - A (PSCGAE).

    Yesterday, I've updated my Windows 8.1 to Windows 10 and install the drivers.

    Version 1.2.41.0 of his Studio of DTS (32/64 bit).

    When I try to open this application I have error: cannot create the instance APO.

    What should I do?

    You need to update the audio driver (I guess that your device uses IDT HD audio card)
    But double check in Device Manager, then expand the section audio controllers, video and game to find out what kind of sound card you have.

    DTS Studio seems to be already aware...

    So I advise you to go to the Device Manager and uninstall its drivers Associates
    After reboot new, Windows 10 must check updates automatically... in case that it does not happen, you can try to manually start the update of the Device Manager.

  • I turned off the toolbars with display - toolbars-(cliquez sur) and now cannot find the display menu to restore their! Duh.

    I turned off the toolbars with display - toolbars-(cliquez sur) and now cannot find the display menu to restore their! Duh.

    This has happened

    Each time Firefox opened

    Press the Alt key to display the Menu bar, then open view > toolbars and select menu bar, so it has a check mark.

  • says device cannot create the folder

    have been on a cruise and tried to use their computer to download some photos but wouldn't work - now my camera says * cannot create the folder *-my computer can't see also photos even though my computer says there is only 3 GB of space left on a 16 GB of my camera card is an EOS 60 d - my card a San disk Ultra 30 Mb 10 16 GB

    It seems that the SD card is damaged. But it might be possible to recover the files. There are a lot of tips online on how to do it. You could start here... http://www.PCAdvisor.co.UK/how-to/storage/3481659/how-get-files-off-corrupt-SD-card/

    Good luck, I know how much vacation photos can mean.

Maybe you are looking for