×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    103

    An Internal Exception-IllegalArgumentException

    Hi!
    I have develop a simple LWUIT application which performs some RMS based operations(add, update, delete, etc.,). After trasaction completed, I shows the Dialog box for response to user. But the UI processing time is very slow, even I used Thread functionality. Before, we view the dialog, if we press any other component an internal exception -illegalArgumentException occured. Whats that Exception means?
    Can u pls, guide me to improve UI processing time-------
    Thanks in advance--------

  2. #2
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    103

    Re: An Internal Exception-IllegalArgumentException

    Pls, guide me----------

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: An Internal Exception-IllegalArgumentException

    Hi Neeraj,
    Well Firstly I had never work in past on LWUIT,I am just guessing and thinking in general...

    @ Tell me the structure of the code -
    Like when you are writing the data in RMS,How mush is the data...the writing code should not be in a loop...like run()'s while infinite loop(if you have this)...

    @ What actually is the slow..it can be the writing or it can be the showing the message alert..

    Then reason for writing slow can be
    1. the data size
    1. thread implementation way,
    2. Other tasks also running parallel to writing..

    You can provide the more information in order to have a quick answer,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    103

    Re: An Internal Exception-IllegalArgumentException

    Quote Originally Posted by raj_J2ME View Post
    Hi Neeraj,
    Well Firstly I had never work in past on LWUIT,I am just guessing and thinking in general...

    @ Tell me the structure of the code -
    Like when you are writing the data in RMS,How mush is the data...the writing code should not be in a loop...like run()'s while infinite loop(if you have this)...

    @ What actually is the slow..it can be the writing or it can be the showing the message alert..

    Then reason for writing slow can be
    1. the data size
    1. thread implementation way,
    2. Other tasks also running parallel to writing..

    You can provide the more information in order to have a quick answer,
    public class Form extends Thread{


    public void execute(final Command exitCommand,final ActionListener commandListener){
    try {
    Label name;
    Label description;
    Label type;
    Label value;
    Form form=new Form("Form");
    form.setLayout(new BoxLayout(BoxLayout.Y_AXIS));

    name = new Label("Name");
    description = new Label("Notes");
    type = new Label("Type");
    value=new Label("Value");

    setTxtName(new TextField());
    getTxtName().setConstraint(TextField.ANY);
    getTxtName().setInputMode("Abc");

    setTxtDescription(new TextArea(3, 20));
    System.out.println(getTxtDescription().getMaxSize());
    getTxtDescription().setMaxSize(500);
    getTxtDescription().setGrowByContent(false);
    getTxtDescription().setIsScrollVisible(true);
    getTxtDescription().setConstraint(TextArea.ANY);

    setCmbType(new ComboBox(types));


    setTxtValue(new TextField());
    getTxtValue().setConstraint(TextField.DECIMAL);
    getTxtValue().setInputMode("123");

    form.addComponent(name);
    form.addComponent(getTxtName());
    form.addComponent(type);
    form.addComponent(getCmbType());
    form.addComponent(value);
    form.addComponent(getTxtValue());
    form.addComponent(description);
    form.addComponent(getTxtDescription());


    final Command cmdAddAsset=new Command("Add OneMore Asset");
    final Command cmdSaveAsset=new Command("Save");
    final Command cmdUpdate=new Command("Update");
    final Command cmdCancel=new Command("Cancel");
    final Command cmdBack=new Command("Back");


    form.setCommandListener(new ActionListener(){

    public void actionPerformed(ActionEvent arg0) {
    Object obj=arg0.getSource();
    if(obj==cmdAddAsset){
    currentaction=ADD_COMMAND1;
    System.out.println("enter into the function");
    Form thread=new Form();
    thread.start();
    }
    else if(obj==cmdSaveAsset){
    currentaction=SAVE_COMMAND;
    Form thread=new Form();
    thread.start();
    }
    else if(obj==cmdUpdate){
    currentaction=UPDATE_COMMAND;
    Form thread=new Form();
    thread.start();
    }
    else if(obj==cmdCancel){
    currentaction=CANCEL_COMMAND;
    Form thread=new Form();
    thread.start();
    }
    else if(obj==cmdBack){
    currentaction=BACK_COMMAND;
    Form thread=new Form();
    thread.start();
    }
    }

    });
    form.show();
    } catch (Exception ex) {
    ex.printStackTrace();
    }
    }


    public void run(){
    if(currentaction==BACK_COMMAND){
    -------code---------
    }else if(currentaction==ADD_COMMAND1){
    -------code---------
    }else if(currentaction==UPDATE_COMMAND){
    save();
    }else if(currentaction==EDIT_COMMAND){
    -------code---------
    }else if(currentaction==SAVE_COMMAND){
    save();
    }else if(currentaction==CANCEL_COMMAND){
    -------code---------
    }
    }


    private void saveAsset() {

    }

    }

    We show this form by calling execute(,) method from the other form.
    When we perform any operation like Save or Update. It takes lot of time to respond.
    Pls, help me------------
    Last edited by neeraja.nokia; 2009-01-07 at 11:45.

Similar Threads

  1. s60 3rd ed emulator crash
    By Kimau in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-06-18, 22:12
  2. Internal Mifare access from internal secure card
    By super_beda in forum Near Field Communication
    Replies: 4
    Last Post: 2007-09-17, 10:55
  3. VS.Net 2003 Carbide 2.01 and epoc32.exe
    By ValentinK in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2007-01-12, 12:31
  4. Catching an exception
    By btnokdev in forum Mobile Java General
    Replies: 2
    Last Post: 2003-10-11, 14:45
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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