Adding dynamic menuitems - how to make menuitem contextin the Run() method

Hello

I'm moving the name of the MenuItem to a routine that I call you inside the method public void run() I'm assocating with all the menu items. I get a compiler error complaining that I can't use the local variable objWorkflowStep.mstrName because it is not a constant.  Is there anyway to get the reference to context or menuitem in the run() method?

menu. Add (new MenuItem (objWorkflowStep.mstrName, intOrdinal += 100, 10))
{
public void run()
{
UiApplication.getUiApplication (.pushScreen)
(DoWorkflowTransitionScreen) new
mobjAppointment,
objWorkflowStep.mstrName));
}
});

Thank you

Hello

Thanks for the help but that will not work either.

The problem is that I add the multiple of these menuitems in a LOOP, all with the SAME sub main() {}. When the run() method is called it is unclear what alleged menuitem.

I think I came up with a brute force solution. I'm going to flatten the loop, hard-code the Menu # as a parameter to my DoWork (...) function called within the run() function and store this menu # as a member of the objWorkflowStep object. This way my DoWork() function can loop through the vector of WorkflowStep objects and find the WorkflowStep with the id of the menu.

Tags: BlackBerry Developers

Similar Questions

  • How to make connections on the outputs of the letter of wsn 3202?

    GOOG morning engineers,

    How to make connections on the outputs of the letter of wsn 3202?

    Sorry, I'm very confused by your response.

    You must not something on the power set by program, just connect a power supply to DIO power and mass of DIO.  Then your DIO lines should be able to output values.

    In addition, I think that you may need to configure the output line.  This would be by the project.  I don't remember what it is, but it should be in some menu properties (probably for the specific line of DIO).

  • I downloaded OS Yosemite and threw it on my photoshop 3 - How to make it to the top?

    I downloaded OS Yosemite and threw it on my photoshop 3 - How to make it to the top?

    Assuming you mean ps cs3,

    Downloadalbe installation files available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

  • Help, please... I need to know how to crop my video segments?  I also need to know how to make several clips to run at the same time by dividing the screens?  How to fade a clip?

    Help, please... I need to know how to crop my video segments?  I also need to know how to make several clips to run at the same time by dividing the screens?  How to fade a clip?

    I watched the video tutorials.  I need to know also how to add additional video tracks to my screen.  Any help please?

  • How to make boxes to the letters for my alias iCloud in Mac Mail

    How to make mailboxes mailbox for my alias iCloud in Mac Mail?

    I have just set up my e-mail address of iCloud for the first time.  I had an Apple account for many years, but had not hitherto iCloud email address.  After that, Mac Mail automatically created an Inbox and an Outbox called, "iCloud" in the Mac Mail.

    Following the instructions I found online from Apple, I created an alias.  I would like to create the mailbox for the alias. How can I do this?

    Because it cannot be changed or deleted, I won't use my "main" iCloud address email for anything whatsoever.  Everything will be done by one or two aliases.

    Thank you for helping.

    You can create a folder for iCloud in the same way, when you create folders for any of your e-mail accounts. However, I suspect that you hope to create an Inbox specially for your alias addresses, which you can not do so. Aliases are aliases for your primary address, they are not different addresses, as such mail to your iCloud address and it's aliases are all moving in the same Inbox.

    What you can do is create a folder for mail addressed to your alias and create a rule to move relevant mail in the Inbox in this folder.

  • How to make firefox recognize the financial institution

    When you access the financial institution how to set up Firefox so that I don't have to answer security questions

    This information is stored in a cookie, so make sure that you keep such a cookie.

    • Create a cookie exception allow (Tools > Options > privacy > Cookies: Exceptions) to keep such cookies, especially for sites Web secure and if the cookies expire when Firefox is closed.

    Make sure that you run not Firefox in private browsing mode.

    Do not use clear recent history to eliminate the 'Site preferences' and 'Cookies' as this does not take into account exceptions, but deletes all specified data.

    Compensation of the "Site Preferences" clears all exceptions for cookies, images, windows pop up, installation of software and passwords.

  • Adding a device:-201401. Make sure that the device is connected?

    I was able to set up my Explorer Measurement & Automation to detect my device (NI cDAQ-9188), but I'm unable to add the device.  The error statement says:

    Add the device failed.  From the device driver error report is as follows:

    Add a device

    -201401

    Recovery of the properties of the network device failed.  Make sure that the device is connected.

    How can I fix this so that I can test my modules e/s?

    DAQmx version: 9.7.5

    Operating system: Windows 7 64-bit

    Initially:

    In the tab network adapters, it reads:

    -No network adapters found

    In the tab of the firmware, it reads:

    -firmware version: 1.1.0f0

    Based on the status of the network configuration tab, I assumed that my problem was related to the network connection.  I have reset my network cards and this seemed to solve my problem.  Thanks for your help.

  • How to make part of the video in black and white and the other part in color

    Hello

    So I want to make this black and white video, but keep what inside the rearview mirror in color,

    I used the black and white masked effect around the mirror, but the only problem is that the camera then moves the mask b & w started out where I need it.

    can someone help me please on how to keep track on the edges of the mirror through the video clip of 30 seconds or more

    Thank you

    Screen Shot 2016-03-25 at 3.36.21 PM.png

    You don't say which version of the body you use, but in the newer versions, you use these tools to have body follow the matte for you:

    More info here:

    Masking and tracking in Premiere Pro

    MtD

  • How to make CutOperation puts the text cut to the Clipboard?

    I have a class that inherits from the EditManager class and provides these methods:

    public function performCopy():void

    {

    var copyOperation:CopyOperation = new CopyOperation (getSelectionState());

    doOperation (action);

    }

    public function performCut():void

    {

    var textToCut:TextScrap = TextScrap.createTextScrap (getSelectionState());

    var cutOperation:CutOperation = new CutOperation (getSelectionState(), textToCut);

    doOperation (cutOperation);

    }

    PerformCopy works very well and makes the text copied to the Clipboard.

    PerformCut deletes as planned, but don't put it on the Clipboard.

    The documentation for CutOperation says "edit Manager is responsible for copying of the text scrap to the Clipboard. Cancel a cut operation does not restore the original Clipboard State. »

    No idea what I could do wrong?

    Thank you

    Stefan

    You can call TextClipboard.setContents (textScrap) to scrap that you made on the system Clipboard. For an example of how this is done in the TLF, see EditManager.as function editHandler. Note that this can only be done as part of a trial to CUT or COPY, except if you run on AIR (access to the Clipboard is subject to the security sandbox).

    Hope this helps,

    -robin

  • How to make reference to the start state?

    Hello!

    I have two States in my Application: Start (State of Base) and connected (defined by myself).

    When I put the Application.application.setCurrentState ("logged") I put the State connected, but if I try:

    Application.application.setCurrentState ("start") that it does not work.

    How can I make reference to the start state?

    Thank you very much

    Hello

    To refer to the use of the base state:

    currentState = ";

    Kind regards

    Ivan Alexander PMP

    SR Application engineer.

    FlexAppsStore.com

  • I just installed an additional printer. How to make this printer the DEFAULT printer

    Just installed an additional printer. How do I do this the DEFAULT printer.

    I moved your question in the comments of answers box, even if you do not specify your version of Windows.

    Control Panel configuration/Printers (or printers and devices)
    Right click on the new printer, select set as default.
    -steve
  • OBIEE 11 g - how to make BI dashboards to run on Port 80 instead of 9704

    Hi all

    I would like to change the default port for OBIEE 9704 to 80 dash don't know how to do this with the new OBIEE 11 g. Any help is greatly appreciated.

    Best regards
    Billon

    Hello
    Check here... http://shivabizint.wordpress.com/2010/10/08/install-obiee-11g-on-same-obiee-10g-server-with-new-ports-configuration/

    Kind regards
    Srikanth

  • How to make or force the Save dialog box for the link pop-up in Dreamweaver

    How do or force the Save dialog box for the pop-up link in Dreamweaver, legally?

    I looked on google how to and what is the code for this but all the answers are to use php or javascript code and paste it into "Web page editor" and edit with your file name. I wonder what the 'legal' way to do that using Dreamweaver options for getting to this: when I click on my link to the image on my Web page, I created, pop-up "save under" dialog box, then the visitor of my site for can save file that my site wish to offer for download.

    It is very easy to just a link certain file (in my case is png image) and open in a new page in the browser, but I want to save as dialog window appears and then visitor on my site to save my png file or not.

    Help!

    You will need to use a script.  If your server supports PHP, this will do what you want. Change filename & path to point to your download folder.  SaveAs download.php.

    Place a link on your page parent download.php file.

    
    

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Adding dynamic text; How can I stop the projection variable name?

    I create a simple game for children.  On the first page, I added a "text input" field for his first name.  I called the firstname variable.

    When they move to the next page, I used a 'text dyanamic' field so I can call by name on this page.  This works.  However, when I test the game, on the first page, where the first name is entered, it shows the _level0.firstname instead of just a blank for them to enter their name.

    I know I've fixed this in the past and it was something simple, but I don't remember how to do it.  I would be grateful to anyone who helps!

    Thank you.

    do not assign a variable name for the textfield object. or, at least, do not use the same name of the textfield variable and instance name.

  • How to make default in the address bar of research follows the selection of the top search bar right

    Hello

    at the time, my default firefox location bar search engine is dynamic, it always follows the preferred search engine on the right upper search bar

    but I clicked some ads in accident, and just go wrong

    my default address bar search engine always uses google, back then, it searches in wikipedia when I use the wikipedia on the top right search engine bar even when I'm just typing "firefox" to search in the address bar, it will be automatically redirected to wikipedia search for "firefox".

    TL; Dr., how can I make a default address bar search engine follows the search engine in the search bar?

    Thanks for your attention

    You can now move on to the beta version of Firefox which is Firefox23 already.

    Don't know exactly what your old configuration were able, but whatever happens and in the near future it must always be easy to change the right hand search bar to use the various search engines.

    At some point in the future there are possibilities the search address bar may be combined and there is also the possibility of a new system of Search-tab under development.

Maybe you are looking for

  • Copy and save photos from Iphoto on Macbook Pro photos

    I spent hours trying to work on this simple operation, but nothing helped. Only start just using Photos, Iphoto, etc. of cloud so jargon is a little confused and I'm a newbie to how it all works, despite searches it seems to be no simple explanation.

  • 35 Firefox can't remove google cookie

    I just noticed that I was wearing a google cookie. I run a strict cookie policy and I had done, already an exception to "allow for session" cookies to books.google.com . I noticed today, in a completely new session, I was wearing a google cookie for

  • How to monitor and lock the network traffic

    I am connected to a network that is always connected to the internet. I needed to display the bytes sent and received and also to block network traffic by not using only Internet. (Vista)

  • Any chance of getting Java BB OS 6.0 app works on playbook?

    I am a new developer is working on my first application.  My client wants to submit an application before the deadline (March 31) to get a playbook for free.  The app is almost completed (version 1.0 in any case). There is a chance that I could have

  • My docs are not opening on top of previous ones.

    Hi people, I don't know how or why, but I suddenly lost the default value 'new windows open on top', (paraphrase), ability. So whenever I open a folder or a document, the "thing" opens behind the one that is already open, (very irritating). I know th