×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    2

    From class back to main application

    I have a very dumb basic question.

    From my main midlet I call upon a class FileSelector as follows :

    Code:
    fileSelector=new FileSelector(this);
    display.setCurrent(fileSelector);
    Now, how can I go back from that class to my main application AND pass along data to it (a byte array) ?
    As you can see the FileSelector is called with as parameter the main application class (FileSelection)
    Inside the FileSelector class the main application class FileSelection is saved as FileSelection fileSelection;

    I can't however use display.setCurrent(fileSelection), as I did to get into my class, to get back to my main application.

    How can I do this AND pass along my byte array ?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: From class back to main application

    Why cant you use display.setCurrent(fileSelection),Is your main class fileSelection is not a displayable class?
    You can try calling any public method of fileSelection class which can take a btye array, for example:

    if FileSelection class as a public method processFile(byte[] file){ process and tranfers control to any other required displayable class }, you call it from FileSelector class.

    thanks,
    ~Amitabh
    http://www.impetus.com/mlabs

  3. #3
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: From class back to main application

    try this

    PHP Code:
    display.setCurrent(object of main class); 
    if U dont have object of your main class in fileselector class try passing it to the class and their are other methods but this is the most simplest one for you
    Regards,
    Saurabh

  4. #4
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    387

    Re: From class back to main application

    Quote Originally Posted by Pmarcoen View Post
    I have a very dumb basic question.

    From my main midlet I call upon a class FileSelector as follows :

    Code:
    fileSelector=new FileSelector(this);
    display.setCurrent(fileSelector);
    Now, how can I go back from that class to my main application AND pass along data to it (a byte array) ?
    As you can see the FileSelector is called with as parameter the main application class (FileSelection)
    Inside the FileSelector class the main application class FileSelection is saved as FileSelection fileSelection;

    I can't however use display.setCurrent(fileSelection), as I did to get into my class, to get back to my main application.

    How can I do this AND pass along my byte array ?
    Hi, i could not get you, which is your main app and where are you going from it? but display.setCurrent() cnt help you?
    Thanks and Regards,
    Manjul.

Similar Threads

  1. java cimd application
    By vandana14 in forum General Messaging
    Replies: 3
    Last Post: 2011-04-07, 16:04
  2. Replies: 4
    Last Post: 2009-07-07, 10:07
  3. Do Symbian rejects the Express Signing request on any Business Development ground?
    By arpit2agrawal in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 23
    Last Post: 2009-02-19, 10:46
  4. Moving an application to the top of the 'main menu grid'?
    By kernj in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-02-21, 21:23
  5. Replies: 3
    Last Post: 2005-03-24, 10:56

Posting Permissions

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