Hey Jeff,

There might be an easier way.
Since launching your app from the card the OS literally copy
the starer.prc into ram (correctly me if i'm wrong).  You can
then alter the version of the file in ram then export it back to the card.
Neve tried it myself ;) in theory this would work.

I have not had any problems with VFSFileDBGetResource() yet.
Could the  file be locked by the os because its launched from
the card? Just a guess.

regards

danny


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff
> Ishaq
> Sent: Thursday, January 09, 2003 6:10 PM
> To: Palm Developer Forum
> Subject: Re: Updating a preference in a SD card-launched PRC
>
>
> At 06:02 PM 1/9/2003 -0600, you wrote:
> >At 15:58 2003-1-9 -0800, you wrote:
> >>I have a utility that auto-runs from an unlocked SD card as
> >>"/Palm/start.prc".  This utility is never run on the same device twice,
> >>so I cannot rely on storing application-specific prefs on the device
> >>itself.  Any such persistent values must be embedded into
> "/Palm/start.prc"
> >>
> >>I need this application to present a user-modifiable preference, and to
> >>persist this information between invocations.  This means I have to
> >>read/write the preference from the "/Palm/start.prc" file on
> the SD card,
> >>and NOT from the in-memory temporary copy of the application.
> >
> >Jeff, is there a reason you can't just store your own prefs file in
> >/Palm/Programs/MySecretProgram/prefs.dat or some file like that.
>  I think
> >that's a lot safer and simpler than trying to write back to a
> PRC file on
> >the VFS volume.
>
> Well yes, there is a good reason I have for not spawning any additional
> files on the VFS card, but I'm afraid I can't disclose that
> information.  Using a prefs file on the SD card sure would make this
> problem a lot easier!
>
> I've also considered an approach #3:
>
> 3) Create a string resource in the PRC to store the preference
> value.  Use
> VFSFileDBGetResource() to read the value.  Then use VFSFileTell() to
> discover its offset, and VFSFileWrite to set the value.
>
> Unfortunately, in this approach, I keep getting vfsErrBadData
> when I try to
> call VFSFileDBGetResource() on my successfully-opened file.  I
> love cryptic
> VFS error codes!
>
> Thanks,
> -Jeff
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to