×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80

    simple question?

    i wanna set a variable that change every time i open the midlet

    for example, i wanna know how many times my midlet opened and bring it to the display
    Let The Impossible Happen!!!

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

    Re: simple question?

    Quote Originally Posted by buffon2009 View Post
    i wanna set a variable that change every time i open the midlet

    for example, i wanna know how many times my midlet opened and bring it to the display
    Take an integer variable and keep on increasing the same inside either the MIDlet's constructor or inside the startApp ().
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Regular Contributor
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80

    Re: simple question?

    no i want the variable keep its value even if i exit my midlet

    when i open the Midlet again it increase and so on

    do u get it?
    Let The Impossible Happen!!!

  4. #4
    Regular Contributor
    Join Date
    May 2010
    Posts
    94

    Re: simple question?

    You have to use Persistant Storage.

  5. #5
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: simple question?

    And you could start by reading this page from FN Wiki about persistent data storage
    http://wiki.forum.nokia.com/index.ph...ata_in_Java_ME

    Hartti

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

    Re: simple question?

    Quote Originally Posted by buffon2009 View Post
    no i want the variable keep its value even if i exit my midlet

    when i open the Midlet again it increase and so on

    do u get it?
    Cool, no issues. for this, at the time you are exiting the app, write that variable inside the RMS and read the when the app gets invoked and thereafter you increase this value.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Simple Question
    By malloc in forum Symbian
    Replies: 3
    Last Post: 2007-04-11, 16:27
  2. A simple question
    By fatalord in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2006-03-31, 15:15
  3. one simple question
    By shadow-2005 in forum Symbian
    Replies: 0
    Last Post: 2006-02-09, 09:06
  4. Simple Question
    By dreamix in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2004-08-10, 12:38

Posting Permissions

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