aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1425

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1425  Keep App in Memory

12/06/2006 @ 18:14
by Colonel Kernel

Anonymous



Hi,
How do I keep my app in memory, like how Memo Pad comes up with the last doc I viewed?

I have a simple Baseball related app which needs to retain its info for a few hours at a time. All of the information currently is one word or one number.

I think I could do it by writing to the preferences after each event and loading them at start up. I could probably also do it by writing to a doc of some kind, but I think that's a bit advanced for my first app.

I also see the SAVESCREEN and LOADSCREEN commands, but am not sure how they're used.

Thanx again and, as before, a small code example with explanations is best.

Ciao,
Bill
Write to Colonel Kernel   Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
12/06/2006 @ 18:37
by Colonel Kernel

Anonymous

visitor
Follow up thought regarding the Preferences method -
- I don't think I'd need to write to them after every single event. But if I did it every so often and when the exit event is recorded should be enough.

Again, thanx.
Write to Colonel Kernel   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
13/06/2006 @ 03:00
by Lou

Anonymous

visitor
You should only need to save the preference(s) when the exit event occures (e=-1).

I've found that saving many preferences can slow down exiting the app. Not a big problem, but it causes an annoying white screen for a second or two. I suggest parsing several data into a few preferences, then unparsing (?) when you load the preferences at the beginning of your code.

Also be sure to handle the case where no preferences have been saved; LOADPREF will return zero.

Lou
Write to Lou   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
13/06/2006 @ 20:05
by Colonel Kernel

Anonymous

visitor
Thanx, Lou. I thought that'd work for saving the current app status but I wanted to check.

I already encountered an empty pref issue when it occurred to me that the system couldn't load a pref if it was never set. I guessed an empty string pref would return "" and it works, so I guess I was right.

To follow up, what are SAVESCREEN and LOADSCREEN used for?

Thanx again,
Bill
Write to Colonel Kernel   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
14/06/2006 @ 19:02
by Colonel Kernel

Anonymous

visitor
Actually, I had an opportunity to guess last night. Some drawn graphic elts were disappearing after I opened and closed another form on top of them. SAVESCREEN and RESTORESCREEN seem to make sure they come back.
Write to Colonel Kernel   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 5
--------
17/06/2006 @ 01:36
by bh77a

Anonymous

visitor
You might want to save your data to a simple database. Aldweb has provided some terrific samples in the program archive. Look them over and if you have some questions, let us know.

Regards,
bh77a/brian
Write to bh77a   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^