How to re - initialize an ObjectChoiceField.

I usually Initializes an ObjectChoiceField like this:

String [] message = GetMessageList();
cboMessages = new ObjectChoiceField ("select a message," messages ");

Add (cboPrinters);

And it works very well.  However, later I want to delete all the entries and add a new list to the ObjectChoiceField.

I can't seem to find how to clear the ObjectChoiceField and I see no way to insert new items?

Am I missing something simple massively?

Thank you.

Try the method of setChoices (choice of Object []) ObjectChoiceField, so in your case, you would say

cboMessages.setChoices (newList);

General, I'm an invalidate() after that I did a setChoices(), just to make sure that the field is being updated on the screen.

Tags: BlackBerry Developers

Similar Questions

  • I'm in 11.1.2.3, how do I initialize a hyperion planning application which will already have dimensions and examples of forms created?

    I'm in 11.1.2.3, how do I initialize a hyperion planning application which will already have dimensions and examples of forms created?

    Connect to the application, go to administration, application, manage applications, select the app, the actions and the initialization.

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • How can I initialize the counter_ column with 1 every 5 rows

    How can I initialize with 1 again once the 'counter_' column every 5 rows on the following query?

    SELECT L.LETTER

    COUNTER_ ROWNUM

    FROM (SELECT "A" LETTER FROM DUAL UNION ALL

    SELECT THE LETTER 'B' FROM DUAL UNION ALL

    SELECT THE LETTER 'C' FROM DUAL UNION ALL

    SELECT WOULD BE ' LETTER FROM DUAL UNION ALL

    SELECT THE LETTER 'E' FROM DUAL UNION ALL

    SELECT THE LETTER 'F' FROM DUAL UNION ALL

    SELECT THE LETTER 'G' FROM DUAL UNION ALL

    SELECT THE LETTER 'H' FROM DUAL UNION ALL

    SELECT "I" LETTER FROM DUAL UNION ALL

    SELECT THE LETTER 'J' IN UNION DOUBLE ALL THE

    SELECT THE LETTER 'K' FROM DUAL UNION ALL

    SELECT THE LETTER 'L' FROM DUAL UNION ALL

    SELECT'M ' LETTER FROM DUAL UNION ALL

    CHOOSE "N" LETTER OF THE DUAL UNION ALL

    SELECT 'O' THE DOUBLE LETTER) L

    I need reach the result below:

    LETTERROWNUM
    1A1
    2B2
    3C3
    4D4
    5E5
    6F1
    7G2
    8H3
    9I have4
    10J5
    11K1
    12L2
    13M3
    14N4
    15O5

    You can just use the MOD to do.

    with w_data like)

    SELECT L.LETTER

    COUNTER_ ROWNUM

    FROM (SELECT "A" LETTER FROM DUAL UNION ALL

    SELECT THE LETTER 'B' FROM DUAL UNION ALL

    SELECT THE LETTER 'C' FROM DUAL UNION ALL

    SELECT WOULD BE ' LETTER FROM DUAL UNION ALL

    SELECT THE LETTER 'E' FROM DUAL UNION ALL

    SELECT THE LETTER 'F' FROM DUAL UNION ALL

    SELECT THE LETTER 'G' FROM DUAL UNION ALL

    SELECT THE LETTER 'H' FROM DUAL UNION ALL

    SELECT "I" LETTER FROM DUAL UNION ALL

    SELECT THE LETTER 'J' IN UNION DOUBLE ALL THE

    SELECT THE LETTER 'K' FROM DUAL UNION ALL

    SELECT THE LETTER 'L' FROM DUAL UNION ALL

    SELECT'M ' LETTER FROM DUAL UNION ALL

    CHOOSE "N" LETTER OF THE DUAL UNION ALL

    SELECT 'O' THE DOUBLE LETTER) L

    )

    Select the letter, COUNTER_,

    MOD (counter_-1, 5) + 1 ngrp

    of w_data

    /

    L COUNTER_ NGRP

    - ---------- ----------

    A          1          1

    B          2          2

    C          3          3

    D          4          4

    E          5          5

    F          6          1

    G          7          2

    H          8          3

    I          9          4

    J         10          5

    K         11          1

    L         12          2

    M         13          3

    N         14          4

    O         15          5

    15 selected lines.

  • How do the initialization of the new hard drive in the macbook pro 2012 model

    I can't the initialization of a new WD hard drive in my macbook pro 2012.

    I installed the new drive and restarted with disk Warrior

    and followed the instructions to press option, command-R.

    When I followed the Protocol to download a new OS, disk utility does not see the newly installed

    HD, what to do?

    < published by host >

    Use disk utility to format drives, no Warrior drive

    How to install OS X on an external drive connected to your Mac - Apple Support

    Drives external Mac OS Extended format before using with Aperture - Apple Support

    http://support.wdc.com/knowledgebase/answer.aspx?ID=1362

  • How do you initialize a large number of variables properly

    I have a large number of variables (say 20 or 30) I want to initialize, cluster and then move to my various Affairs of State.  Is there a way to set variables in something like the type definition that you guys taught me how do for enums that would make for easy maintenance?  Would you just create a type definition with variables like controls with their default values defined in the definition of type... but then how would cluster them so they would become a variable (all Variables of type def) when you brought in the scheme of main program?

    Try to be more careful.

    Thank you

    Hummer 1


  • How can I initialize a spelling?

    I have a program for the HP4192A.

    The program can draw XY, but the next plot will be based on the previous ones. So I have to close the program to delete the graphic.

    How can I add a button or switch to initialize the graph, so I don't have to close the program.

    Thank you very much.

    I cleaned the diagram on the EIS VI test.  It is easier to see what's happening this way.

    Comments on the program:

    1. do not the two wires on the connector a for a loop and connect a table via a terminal autoindexing.  Who has the smallest value will determine the number of times that the loop iterates.

    2. it is generally not a good practice to use the table build inside a loop, because it can cause frequent memory reallocations.  Best practice is to initialize the array to the maximum size, it will reach outside the loop and use replace a subset of table inside the loop.

    3 there is nothing wrong with the mixture of nodes and feedback shift registers in a loop, but this can be confusing someone watching the program later as to why. I prefer the register shift, but it's at least partly because I used LV long before that the crux of the feedback has been introduced.

    4. the high passage registry ends up with the same data that the table introduced in the loop of the sequence constructor screw is there a reason why you take it apart and back together again?  Similarly, it is not necessary use table of Index with the Index Entry linked to i, especially since you already got the same table autoindexing.

    5. I consider amending the measure VI HP4192 more far: eliminate feedback nodes and graphs because you perform these functions in the main VI.

    6 use the Negate, rather than multiply by-1.

    I can't save in version 7.1, so I've attached a picture of the block diagram with many of these changes.

    Lynn

  • How to correctly initialize the CDotNetHandle

    Hello everyone,

    I created a .NET controller from an assembly written in c#, I got.

    I called the Initialize_... () and the Close_... () routine, which seem to work well.

    Now I'm calling between this two functions of another function that must initialize a driver and CDotNetHandle * Exception_Handle as a parameter.

    I stated this setting with

    CDotNetHandle *Exception_Handle;
    

    But now, I get the error:

    Local 'Exception_Handle' has been referenced before current initialization.

    Now how and with what value initialize this pointer?

    Pls detailed as my C knowledge is a little rusty

    Based on this exception, my guess is that the Assembly you load has dependencies that cannot be found.  They are likely in the same folder as the assembly you load, but because you're application is not in the same folder, the CLR has no way to find them.  You can verify this by checking the newspaper merger generated durning the binding of assembly process.

    If my assumption is correct, the best way to solve what you see is strongly name your assemblies and place them in the GAC, or move your CVI application in the same directory as all of the assemblies it depends on.

    NickB

    National Instruments

  • How to properly initialize a property list?

    Specifically, how to configure a list of lists of property?

    For example:

    PropList [1] [#courseID]: = value
    PropList [1] [#courseName]: = value
    PropList [1] [#TestDate]: = value
    PropList [1] [#TestDuration]: = value
    PropList [1] [#TestStatus]: = value

    PropList [2] [#courseID]: = value
    PropList [2] [#courseName]: = value
    PropList [2] [#TestDate]: = value
    PropList [2] [#TestDuration]: = value
    PropList [2] [#TestStatus]: = value

    How to initialize var proplist correctly?

    Thank you

    Mark

    Los options, bu its should work fine

    [PropList: =]

    PropList [1]: = [:]

    PropList [2]: = [:]

    Steve

  • How can I initialize a web application in a cluster

    Our test environment is a single node, but we must move to a clustered environment. We have a database initialization, what we do with a "Startup servlet' with the marker to load at startup.

    Now how does it behave in a clustered environment? The servlet will be called once or once a node?

    Should review us the startup initialization? Are there methods recommended for clusters of Weblogic regarding the start-up of initialization?

    BTW: Weblogic 10.3

    see you soon,
    Rob

    Published by: [email protected] on October 20, 2009 06:48

    Servlet init() will be called by every JAVA virtual machine, the application is in, no matter if it is in a cluster or not.

    If you want to once by the behavior of the cluster, you should consider something like a Service Singleton, who is outside your application OR use something like Oracle coherence in your application that allows you to easily check if initialization has already occurred in another Member of the cluster.
    http://download.Oracle.com/docs/CD/E12839_01/Web.1111/e13709/service_migration.htm#i1051668

  • How can I initialize with a previous osx of the external drive?

    About 4 years ago I installed Snow Leopard on an external drive while I was running Snow Leopard on the main drive. I wanted to load a lot of video on this player to be able to use the version of Snow Leopard of iMovie when I updated the main drive. However, when I upgraded to the Mavericks (recently in Yosemite), he would list is no longer the disc of Snow Leopard when I pressed down option. And when I went to preferences/Startup and chose to start with Snow Leopard, it would not be completed the boot process.

    If I use disk utility and create a partition to use for initializing with Snow Leopard, space-how much should I assign this partition? The external drive is 1 t and it is full of 50%.

    Also, I have a 500 GB internal drive I removed a Mac deceased and put in an envelope. There are also Snow Leopard. After the partition is created, can I exchange the two external drives to be used on the same partition? What I want to do with the box HD's boot up with it, then install Mountain Lion.

    I want to give to anyone who helps me the credit, but I have 3 questions under one heading. Is there a way to get triple credit?

    I'm starting to get lost with all these drives, partitions and 4 versions OSX.

    I wonder what happened to your old Snow Leopard.  You always use the same computer that you used with Snow Leopard? A Mac can start only in the operating system with which it is originally came or newer.  Your profile information from computer to the bottom of your post mentions a 2012 MacBook Pro which is not a Snow Leopard machine.

    How much space depends on how you'll use it and how you configure.  I would like to make at least 30 GB so there is a little space, wiggle but if you start to install the applications then 60 + GB.

    I know most recent disk utilities are supposed to be able to resize partitions without erasing but I'll make sure you have solid backups first.

    You can assign a 'resolved' and two "helpfuls".

  • How to use a good ObjectChoiceField

    I use ObjectChoiceField, but by default that objectchoicefield is not beautiful, who can help me for a code, thanks

    Hi I have modified your code this way to check the focusChange and editing text.

        class MyChoiceField extends ObjectChoiceField
        {
            boolean onFocuss;
            MyChoiceField (String label, Object[] choices,int choice,long style)
            {
                super(label,  choices,choice,style);
    
            }
    
            public void paintBackground(Graphics graphics)
            {
                if(onFocuss)
                {
                    graphics.clear();
                    int color = graphics.getColor();
                    graphics.setColor( 0x00FF00 );
                }
                else
                {
                    graphics.clear();
                    int color = graphics.getColor();
                    graphics.setColor( 0x000000 );
                }
            }
    
            public void onFocus(int dir)
            {
                onFocuss = true;
                invalidate();
            }
    
            public void onUnfocus()
            {
                onFocuss = false;
                invalidate();
            }
        }
    
  • How can I initialize my ID XI of Acrobat Pro?

    I got the message about I have to disable XI Acrobat pro in other computers.

    But I couldn't access the computers.

    How can I turn off Acrobat Pro XI in all computers?

    Contact Adobe technical support via chat and ask them to reset the activations.

    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.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • Satellite Pro P70 - Has: 2nd invisible HARD drive - how to initialize the 2nd HARD drive

    I have a P70 - A. Satellite Pro
    'Primary' hard disk failed, and has been replaced by the service centre.

    Now, only the main hard drive is shown and the Service Center said that I had to 'initialize' the second hard drive to make it visible. They assure me that the hard drive is there, just hidden.

    How can I make visible?
    How do I initialize it?

    Usually, you can initialize the disk by DiskManagement.

    In disk management, right-click the disk you want to initialize and then click on initialize disk.
    In the dialog box initialize the disk, select the disk to initialize.
    You can choose to use the master boot record (MBR) or the style of partition GUID partition table (GPT).

    Once a disk is initialized, you can create partitions on it.
    After you create a partition, you can format the partition to create a filesystem (NTFS).

  • How to initialize the BB application?

    Hi all

    How can I initialize my request when I open the Simulator?... Means, I want that whenever the main method is called & him nothing is done before that some actions must be taken.

    In short, I want even as contextListener Servlet in my BB application... Please help me if you have an idea.

    Thank you best regards &,.

    Craig

    No, I've never worked on a J2EE environment... So, if the issue is that you must do certain things even before the start of the application, No you CANNOT...

    But you can, however, take a few steps, before the application shows his first screen...

    However, the best way that I would say is, set up another point of entry... In this entry point to do things you need like initialization steps... So the startup entry point will do the things that you specify, for you (it will not start your application, it will do things and get out)... And the main entry point (when you click on in the home screen), start your application...

    See you soon...

  • How to initialize a disk.

    Original title: initlize discs

    How can I initialize a disk

    Hello

    Thanks for posting in the Microsoft Community Forum. Rest assured that we would do our best to help you.

    Please let us know if you try to initialize new disks?

    In order to initialize the disk, follow these steps:

    (a) open computer management by clicking the Start button, click Control Panel, click System and Security, click Administrative Tools , and then double-clicking on computer Management. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    (b) in the left pane, under storage, click disk management.

    c) in management of the disk, right-click the disk you want to initialize, and then click on initialize disk.

    You can also see the following link for more information about initialization of disks:

    http://TechNet.Microsoft.com/en-us/library/cc771486.aspx

    If you have any questions do not hesitate to answer, we would be happy to help.

Maybe you are looking for

  • iTunes could not connect to the iPhone, because an invalid response was received from the device.

    Just bought an iPhone 7 today and received the error message "iTunes could not connect to the iPhone because an invalid response was received from the device." Don't know what that means, and I have never had this problem with one of my previous iPho

  • IOS9-where can I see my cursor of volume on the playlist?

    What happened to the volume slider in the playlist view?  It was crucial for how use playlist in my massage practice.  I cannot, midmassage with greasy hands, being thrown the ipad to find a volume control.  I could, however, with greasy hands, simpl

  • Firefox hangs at startup; not extensions, any new profile

    Even after a clean installation (removal of all extensions/plug-ins and previous profile settings), 7.0.1 Firefox still does not work in accordance with its normal operating characteristics. Immediately after double-clicking on the icon, the Crash Re

  • Cable network keeps disconnecting after a period of time

    Hello I just bought a new Lenovo Z510 and I have serious problems with the network Ethernet cable. When I turn on the laptop and plug in the cable, it works for about 5 minutes. Then it suddenly disconnects (with software) while physically he is stil

  • Cluster of buttons

    Hi guys,. I need help. In my example below, there are two tabs of page with a cluster of three buttons within each tab. In the block diagram, I have a while loop with a cluster of events with event Cluster 1 and Cluster 2 all the items selected. I al