4

I'm currently making an app for Asha phones, both the 3xx series and the new 5xx ones.

I already have the code working on the 3xx series such as Asha 310 and 311, but for some reason, when I compile and try it on Asha 501 phones, it doesn't work..

I'm getting the 'Radio 1 clicked!!!' message on the Asha 310's emulator console, but not on the Asha 501.

I'm using Nokia Java SDK 2.0 for the Asha 310/311 and Nokia Asha SDK 1.1 for the Asha 501 phones and the proper Asha LWUIT libraries that comes inside the SDKs.

Does anyone have an idea why it's working on the older Asha phones but not the new ones?

        Form form = new Form("Testing form");
        RadioButton choices[] = new RadioButton[2];
        RadioButton radioButton1 = new RadioButton("Radio 1");
        RadioButton radioButton2 = new RadioButton("Radio 2");

        choices[0] = radioButton1;
        choices[1] = radioButton2;
        PopupChoiceGroup popupChoiceGroup = new PopupChoiceGroup("Testing", choices);

        radioButton1.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                System.out.println("Radio 1 clicked!!!");
            }
        });

        radioButton2.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                System.out.println("Radio 2 clicked!!!");
            }
        });
        form.addComponent(popupChoiceGroup);

        form.show();

Edit: I'm using phone emulators so I can see the outputs.

Pat
  • 1,193
  • 1
  • 11
  • 36
  • You cannot test like that. The phones has no visible console. System.out.println will never display on any JavaME phone. To properly test you should create a text-field in your form, and put text in that instead. – mr_lou Dec 21 '13 at 07:17
  • I'm using phone emulators.. As I mentioned, I'm getting the text on the 310 emulator's console, but not on the 501 emulator's console. And before you ask, yes, I'm getting other texts on the 501 emulator, just not this one.. – Pat Dec 22 '13 at 17:03
  • Asha SDK components is very very buggy( – ADK Jan 09 '14 at 18:00

1 Answers1

1

I would suggest downloading LWUIT separately and testing with various versions. Another suggestion is to extend the PopupChoiceGroup as your own class and then dive into the source code for PopupChoiceGroup, adding snippets and debugging as you go along. The quirks of LWUIT are best dealt with in its source, it is best to extend and then modify the behaviour, it really is not as daunting as it seems.

Ajibola
  • 1,218
  • 16
  • 28
  • I ended up making my own pop up dialog that imitates the PopupChoiceGroup on the Asha 5xx. – Pat Dec 30 '13 at 06:51
  • I should note that the action listener on the Asha 501 for the popup group isn't supposed to work according to what I saw on the Nokia forums. Not sure how true that is, but I think that's the case. – Pat Dec 30 '13 at 07:11