×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    5

    Which LWUIT plugin for Asha SDK 1.0

    Hi,

    I wonder which jar I should use for Asha 1.0 (Nokia 501)?

    In folder Nokia\Devices\Nokia_Asha_SDK_1_0\plugins\lwuit\lib\asha1.0\ I have a few:
    - S40-asha2013.jar
    - S40-full-touch.jar
    - S40-touch-and-type.jar
    - S40-with-themes.jar

    I use the first one and have NullPointerException trying to instance TextField.

    Code:
            txtFrom = new TextField(5);
            txtFrom.setConstraint(TextField.DECIMAL);
            txtFrom.setText("1");
    ...
    [DISPLAY] Warning: setPureTouch is disabled!
    no localization file: locale/locale.res. Load localization manually.
    java.lang.NullPointerException
            at com.nokia.mid.ui.TextEditorLFImpl.lSetParent(), bci=88
            at com.nokia.mid.ui.TextEditorImpl.setParent(), bci=32
     - com.nokia.lwuit.TextEditorProviderImpl.setParent(TextEditorProviderImpl.java:212)
     - com.sun.lwuit.impl.s40.S40Implementation.requestNewNativeTextEditor(S40Implementation.java:62)
     - com.sun.lwuit.TextArea.initTextEditor(TextArea.java:808)
     - com.sun.lwuit.TextArea.initComponentImpl(TextArea.java:799)
     - com.sun.lwuit.TextField.initComponentImpl(TextField.java:1465)
     - com.sun.lwuit.Container.initComponentImpl(Container.java:603)
     - com.sun.lwuit.Container.initComponentImpl(Container.java:603)
     - com.sun.lwuit.Container.initComponentImpl(Container.java:603)
     - com.sun.lwuit.Form.initComponentImpl(Form.java:1255)
     - com.sun.lwuit.Display.setCurrent(Display.java:1154)
     - com.sun.lwuit.Form.show(Form.java:1248)
     - com.sun.lwuit.Form.show(Form.java:1226)
    What is wrong with this TextField?

    Regards,
    Bogus

  2. #2
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: Which LWUIT plugin for Asha SDK 1.0

    I used s40-with-thems.jar and it worked, don't know about why TextField won't work wiith S40-asha2013.jar though.

  3. #3
    Nokia Developer Champion
    Join Date
    Aug 2010
    Location
    Ahmedabad
    Posts
    299

    Re: Which LWUIT plugin for Asha SDK 1.0

    Quote Originally Posted by bogus40 View Post
    Hi,

    I wonder which jar I should use for Asha 1.0 (Nokia 501)?

    In folder Nokia\Devices\Nokia_Asha_SDK_1_0\plugins\lwuit\lib\asha1.0\ I have a few:
    - S40-asha2013.jar
    - S40-full-touch.jar
    - S40-touch-and-type.jar
    - S40-with-themes.jar

    I use the first one and have NullPointerException trying to instance TextField.

    What is wrong with this TextField?

    Regards,
    Bogus
    I used same S40-asha2013.jar file and tried following code. It works fine.

    Code:
     public void startApp() {
            Display.init(this);
            
            Form fmrNew = new Form("Test Form");
            
            TextField txtFrom = new TextField(5);
            txtFrom.setConstraint(TextField.DECIMAL);
            txtFrom.setText("1");
            fmrNew.addComponent(txtFrom);
            fmrNew.show();
        }
    could your please share more code?

  4. #4
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: Which LWUIT plugin for Asha SDK 1.0

    girishpadia is right, I tried S40-asha2013.jar and it works fine on Asha 501 emulator.

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    1

    Re: Which LWUIT plugin for Asha SDK 1.0

    I'm getting the same error , but when I try to use TextEditor class. This error is intermittent. I cannot find a way to reproduce. It seems an bug in TextEditor.

    java.lang.NullPointerException
    - com.nokia.mid.ui.TextEditorLFImpl.lSetParent(), bci=88
    - com.nokia.mid.ui.TextEditorImpl.setParent(), bci=32
    - com.nokia.transit.ui.components.TextInputEditor.createTextEditor(TextInputEditor.java:267)
    - com.nokia.transit.ui.components.TextInputEditor.enableKeyboard(TextInputEditor.java:281)
    - com.nokia.transit.ui.components.TextInputEditor.showNotify(TextInputEditor.java:105)
    - com.nokia.transit.ui.TripPlannerSearch.showNotify(TripPlannerSearch.java:117)
    - javax.microedition.lcdui.CanvasLFImpl.uCallShow(), bci=52
    - javax.microedition.lcdui.Display.callScreenChange(), bci=133
    - javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleScreenChangeEvent(), bci=4
    - com.sun.midp.lcdui.LCDUIEventListener.process(), bci=93
    - com.sun.midp.events.EventQueue.run(), bci=182
    - java.lang.Thread.run(), bci=5

  6. #6
    Registered User
    Join Date
    Feb 2013
    Location
    Madrid
    Posts
    84

    Re: Which LWUIT plugin for Asha SDK 1.0

    Are you importing the libraries in the proper way? Check it out.

Similar Threads

  1. LWUIT TextField issue (Asha FullTouch )
    By bogus40 in forum Mobile Java UI and User Experience
    Replies: 6
    Last Post: 2014-03-21, 09:22
  2. Replies: 2
    Last Post: 2012-11-23, 08:39
  3. Problem with LWUIT Theme in Nokia Asha 311
    By harsha921 in forum Mobile Java General
    Replies: 3
    Last Post: 2012-09-05, 10:11
  4. How to append LWUIT List screen to a LWUIT Form in j2me?
    By pavanragi in forum Mobile Java General
    Replies: 1
    Last Post: 2012-08-06, 07:01

Posting Permissions

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