×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    1

    Question Visual Mobile Designer J2ME: How to put NUMERICAL values to user inputs.

    I want to put if-then statements in Source Code. Since VMD have system generated codes.I don't know where to put my statements. For example in a ChoiceGroup, I have a YES and NO elements, I want YES to have a value of 1 and NO = 0. My MIDLet have this codes:

    public ChoiceGroup getCURRENTFamHistory() {
    if (CURRENTFamHistory == null) {
    // write pre-init user code here
    CURRENTFamHistory = new ChoiceGroup("Family History of Any Cancer:", Choice.EXCLUSIVE);
    CURRENTFamHistory.append("NO", null);
    CURRENTFamHistory.append("YES", null);
    CURRENTFamHistory.setFitPolicy(Choice.TEXT_WRAP_DEFAULT);
    CURRENTFamHistory.setSelectedFlags(new boolean[]{true, false});
    // write post-init user code here

    }
    return CURRENTFamHistory;
    }




    Please help!. Thank you in advance.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Visual Mobile Designer J2ME: How to put NUMERICAL values to user inputs.

    you can call setCommandListener on your component and in the callback based on the index you can query back the data from the data structure !!

Similar Threads

  1. Is there a visual designer like MFC/WinForm in Visual Studio?
    By XinLi in forum Mobile Java UI and User Experience
    Replies: 8
    Last Post: 2013-07-15, 06:57
  2. Replies: 1
    Last Post: 2009-06-20, 10:01
  3. Visual Mobile Designer is missing
    By zsoltszalay in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2008-08-16, 18:43
  4. user inputs in active objects
    By ceehira in forum Symbian
    Replies: 1
    Last Post: 2005-12-04, 19:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •