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

Tags: NI Software

Similar Questions

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

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

  • dynamically create and addEventListener on the mouse, click

    Hi, I have 9 buttons on the main stage and each has an incremented instance P0001, P0002, P0003 name...

    I'm trying to dynamically create and addEventListener on mouse click for each call, then the function appropriate when the button is clicked, it is I who does not work, I go about it the wrong way? Thank you

    for (var i: int = 1; i < 10; i ++) {}

    var btn1:String="P000"+i.toString();

    var btn11:Object = btn1;

    var ClickBtn:String="Func"+i.toString();

    btn11.addEventListener (MouseEvent.CLICK, ClickBtn);

    i = i + 1;

    }

    function ClickBtn1(event:MouseEvent):void

    {

    trace ("in it1");

    }

    function ClickBtn2(event:MouseEvent):void

    {

    trace ("in it2");

    }

    ......

    Use:

    for (var i: int = 1; i<10; i++)="">

    This ["P000" + String (i)] .addEventListener (MouseEvent.CLICK, this ["ClickBtn" + String (i)]);

    }

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

  • 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

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

  • How to avoid the default menu items?

    All of hell

    I'm developing an app for BlackBerry handheld.  I add menu items that are specific to the different screens of my application by substituting the makeMenu (.) method. I DON'T want to include default menu items...

    Select Mode
    Page view
    To find
    Copy
    Call 12093...
    12093 SMS...
    12093 MMS...
    Add to Contacts

    Now I do menu.deleteAll () in the first line of the makeMenu (.) method. Suggest me if this isn't the right way?

    It deletes all the elements default menu above.

    Now, in the application, the specific menu item get highlighted based on the next action of logic, that I do a menu.setDefault (menuItem).

    But for the instance when some contact number is selected on the screen (usually 'call' option get highlighted on the menu, but here we have removed) the highlight of the menu according to my works item IS NOT pathological and it always shows the menu first point highlighted.

    I suspect it might be because the default menu items have been added (by program then deleted). That's why I decided to override the onMenu (.) method where I'll call makeMenu (...) to the new instance of the Menu (that are not default menu items), so I'll see the menu using menu.show () and then return true.

    Now by the fix above, the highlight of the menu on my terms item works fine regardless of some contact number is highlighted on the screen or not, BUT the menu is displayed on the upper right and not on the bottom left where it should be.

    This approach is correct, or there is a better way to approach this?

    Thank you

    Mukesh

    OK guys... I had the problem!

    The problem is that if any time a highlighted menu item is removed (as in our case, menu item 'Call' is deleted by menu.deleteAll (()) the priority agenda menu get highlighted. This is just the reason why the first menu item get highlighted if the phone number is selected.

    To fix this, I highlight the appropriate menu option by setting up priority for her.

  • How to list the PHONE menu items

    Hello.

    I am building an app that injects the menu and the wheel to the up and down events to access elements of the PHONE menu.

    To be precise, in appeal, at any given time my application needs to choose an item from this menu.

    So I inject the MENU, then the Dial-UP (for a step or two), then ENTER.

    Now, I need to be sure that I pressed the right menu item.

    This is why I would like the ApplicationMenuItemRepository.MENUITEM_PHONE to the list

    Is it possible to do?

    There is no method that returns the menu of a BlackBerry application or the item currently selected in the menu.

  • Get the current menu item selected

    Hello

    I use Jdeveloper 11.1.2.3.0

    I want to set the property collapse of the separator group based on the selected menu item by using the expression language.

    How to get the current selected menu item.

    Best regards

    Haytham Talha

    Hello

    Here is an example using setPropertyListener to set the selected item and use it to collapse of panelSplitter:

    
         
              
                   
             
            
              
           
         
                   
    
    
         
              
         
         
              
         
    
    

    Jean Lou

  • Redirect the user to the different menu item

    Hi guys,.

    JHeadstart 11.1.1.3.35

    I use the JhsTree menu structure. One of my menu items is a wizard that goes directly to the insert mode, so at the end of the wizard, I redirect the user to a different group (menu item). The problem is that while the new menu page is displayed to the user, the previous menu item (Assistant menu) is still selected, so that if you try and you reenter the Wizard menu item, nothing happens as the structure of the menu and the page are out of sync (and the menu believes that you are already on the page of the wizard even if you're not)

    My question is, also the creation of a navigation to a different menu item rule, how can I programmatically change the selected menu item?

    See you soon,.
    Brent

    Brent,

    No, you can remove these goods safely.

    Steven Davelaar,
    JHeadstart team.

  • Data Modeler: how to create and use the collection type

    Hello
    essentially of departure I don't understand how (for example) create and use the data based on the type of data varray type.

    Please notify.
    Thank you
    Andrew

    Hi André,.

    You can create new types of collection (varray/table) in two ways:
    (1) in the browser - find 'Types of data' > 'Types of Collection' node menu dropdown - there just 'create new collection type' it
    (2) in the types of data model diagram - you can create collection "some type structured" or collection of references to the it - use 'new Collection... '. "tool and click first on sight structured type and after the structured type that will contain the collection - new attribute is added to the latter and if there is none this type of collection already didn't set the new collection type are created and you can change it later.

    Philippe

  • Hi, I can not buy Lightroom 6. I'm at the Luxembourg, once the product is in the basket, and I ask to check I got a message telling me my Adobe ID is registered in another country, and we cannot treat. I tried with a different ID, I created and still the

    Hi, I can not buy Lightroom 6. I'm at the Luxembourg, once the product is in the basket, and I ask to check I got a message telling me my Adobe ID is registered in another country, and we cannot treat. I tried with a different ID, I created and always the same question even if I did everything since the Luxembourg. Really sad

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Get help from cat with orders, refunds and exchanges (non - CC)
    http://helpx.Adobe.com/x-productkb/global/service-b.html ( http://adobe.ly/1d3k3a5 )

  • When I send someone a document I changed if his crossing of the stuff or by adding arrows, when the customer print, it does not show my changes, I'm going through our prices so visitors cannot see and when the customer print them they can see prices?

    When I send someone a document I changed if his crossing of the stuff or by adding arrows, when the customer print, it does not show my changes, I'm going through our prices so visitors cannot see and when the customer print them they can see prices?

    You probably use drawing markup tools. There are options to print with or without annotations. You can not change this.

    If you don't want them to see the prices, either remove the original document and recreate the pdf without them there or you can use the redaction tools in the full paid for version of Adobe Acrobat Pro.

Maybe you are looking for

  • Custom cookie activation kills facebook handling drop-down lists

    Hello I use firefox for several years, but recently I discovered an odd effect on one of my computers, which corresponded through many versions of FF (up to version 17 now).All of the drop-down menus on facebook did not work for me. On a pc, I can cl

  • X 2 elite 1012 G1: HP Elite Thunderbolt 3 65W USB - C docking station does not not on Elite X 2 1012 G1

    Hello I just got the USB docking station - C HP Elite Thunderbolt 3 65W. I plugged in and my Elite X 2 1012 G1 fresh, but that's all. No ports do not work. The monitor is not recognized or the other. If I plug in my phone via USB, it loads, but not r

  • IMAP issues

    I can't get my godaddy imap email working. I checked the settings again and again. When I use the same setings on my Droid X, they work without problem. The error I get is "password" or incorrect user name but they are correct. This would be a matter

  • Binding controls reference

    Hello I would like to know if there is a possibility to bind controls of the same type of reference data, so that they contain the same data. This means that when you write to a property "Value" of the reference it automatically updates bound control

  • Why updated important keep for lack of 66A on Windows Vista

    An update important 66A keeps failing to update