Ben Combee wrote:
At 09:12 PM 11/7/2005, you wrote:
Yes there is a reset when someone pulls the card and the program can
no longer access the files it needs, so what you are describing is
what I'm seeing. So back to the original question, I guess the answer
is that if it is not deleted from system memory then I must assume
that it is the result of the above, and I should delete it. So to
delete a file from system memory what API do I use?
DmDeleteDatabase is the usual API... however, you'll have a hard time
doing that from your program, as you'll be trying to delete yourself.
You'll need some sort of helper application... however, you'll have to
figure out from your app whether you were run off the card or run from
main memory, which can be done based on launch codes, but gets
complicated.
Couldn't he just use the recyclable bit in a fairly painless fashion?
At runtime he could take a look in the Palm/Launcher folder on the SD
card. If he finds his app then he presumes that the RAM version is only
temporary, and should be cleaned up, so he sets the recyclable bit of
the running version of his app. Before setting the bit he could explore
the SD version a little, to make sure that the SD version is the same as
the running RAM version. If there is a mismatch, he could ask the user
what to do: overwrite the SD version, delete the RAM version, keep
both...? Using the recyclable bit would clean it up as soon as the user
switches to another app, or upon reset, right? Bob
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/