Re: Looking for some advice for my program
- From: "Webbiz" <noreply@xxxxxxx>
- Date: Sat, 2 Feb 2008 12:30:03 -0600
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:udxrgdbZIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
"Jan Hyde (VB MVP)" <StellaDrinker@xxxxxxxxxxxxxxxxxxx> wrote in message
news:ls39q3dig9l8u48do5a6ve9grv4vopsahi@xxxxxxxxxx
"Kardon Coupé" <prefer.to@xxxxxxxxxxxxxxxxx>'s wild thoughtsthis
were released on Sat, 2 Feb 2008 09:41:15 -0000 bearing the
following fruit:
Dear All,
I have been thinking for a while now and can't come to a conclusion for
.txtproblem
I've written a program that saves settings and other information in a
upgradedfile and reads it when the program loads.. up until now, when I've
otherthe program I've had to advise the 'testers' to uninstall and re-install
because I've added extra things and the old settings (.txt files) and
binarystuff would cause a crash, as the program is looking for one thing, and
finds something else...even when I introduced a new option, it was
easier
for me to create a new .txt file for that particular part. Ultimately I
would love everything within one file, be it a .txt file, or even a
maybefile that was as visible to the user....
What I ask, is there a fool safe way of saving information, so that any
upgrades aren't as painful?
I was thinking (if I was going to stay within the .txt file format) to
dumpshave a number system, I.e. the program reads the settings number and
mayit into the required setting based on the number...but I'm thinking that
yourbe too complicated...
I've used many a program that you can over-upgrade and most if not all
settings carry over, I would like to achieve the same thing...
Hope this makes sense..
I'd agree with the other poster than an INI file would be
easier to manage. That aside, if it's causing your app to
crash then then it's your app that is at fault. I would have
though you could have coded to cater for old\new settings.
I agree.
Mr. Hyde expressed it well enough, so I'm only adding my vote.
The particular "store" is NOT the real issue. The issue is you have not
designed for flexiblity. That said, an INI would help in that one can
easily
versionize the Sections.
While you're reworking your App you are also advised to separate out these
'settings' into machine-specific (all users), user-specific, and
App-specific configurations. Or eventually *where* you store these items
will become another issue. <g>
-ralph
Man am I glad I decided to read this thread. I've had the same upgrading
issues (somewhat) with my application.
When I first started it back in 2000 (yes, its a long haul project), I was
still learning that 1+1 does not equal 3. Over time, and thanks to the great
programming folks here, I've made big leaps.
However, my program still uses a SAVE/LOAD file that is not very flexible.
Everytime I am adding a new indicator to my program, I have to add it also
to the SAVE routine so it can be saved with the other indicator settings.
But then, I must go to the LOAD routine and make sure that I load the
settings in the SAME ORDER that I saved it.
Well, that works okay, except that now users get these errors because the
last time they saved their charts, it didn't have that extra indicator
information. To fix it, they only need to click on SAVE to update the format
of their save file. But it is clearly not a good thing.
All this time, I had not thought of using an INI format. In fact, I had
completely forgotten that you use API calls to deal with them. Being simple
text files, I can only think that the API is for dealing with the 'order' of
the information, so that I do not have to. Would that be the correct
assumption?
Thx.
Webbiz
.
- Follow-Ups:
- Re: Looking for some advice for my program
- From: Karl E. Peterson
- Re: Looking for some advice for my program
- From: Jan Hyde (VB MVP)
- Re: Looking for some advice for my program
- From: RB Smissaert
- Re: Looking for some advice for my program
- References:
- Looking for some advice for my program
- From: Kardon Coupé
- Re: Looking for some advice for my program
- From: Jan Hyde (VB MVP)
- Looking for some advice for my program
- Prev by Date: Re: Floating Box for Prices
- Next by Date: Delay Acknowledging Mouse Click and Hold
- Previous by thread: Re: Looking for some advice for my program
- Next by thread: Re: Looking for some advice for my program
- Index(es):
Relevant Pages
|