Hi Walt,

If I wanted to achieve that functionality I'd do something like.

Initialise from files in target directory or default directory given
preference to default directory.

Create target directory if it doesn't exist.

for each file x in default directory
   copy x to x.tmp in target directory, moving one block every nil event
   rename x.tmp to x in target directory
   delete x from default directory
end for

In your event loop have a if (copying) check to set a suitable time-out for
EvtGetEvent to generate lots of nil events.

Regards,

p.s. I'm assuming that your data files are read-only as far as your app is
concerned.  If they are read/write you'd have to have a dirty flag system
for each block.


On 09/02/07, Walt Bilofsky <[EMAIL PROTECTED]> wrote:
>
> Hi, Pinus -
>
> It doesn't bother me.  But a few users have complained.
>
> My PDA has two files in /PALM/Launcher (a .prc file and LAUNCHER.DAT),
> and 7 directories in /PALM/Programs.  Apparently other programs do it
> this way too.
>
> Regards,
>
> Walt
>
> "Pinus Alba" <[EMAIL PROTECTED]> wrote:
>
> >Hi Walt,
> >
> >I can understand why you might prefer that the files went to a particular
> >directory.
> >
> >But, why could your users care less?  Unless this affects the usability
> of
> >your application from a user view point why can't you just accept it?
> >
> >Regards,
> >
> >On 09/02/07, Walt Bilofsky <[EMAIL PROTECTED]> wrote:
> >>
> >> Sorry to post again on this issue, but it's driving me nuts.
> >>
> >> I'm still trying to design an elegant method for installing database
> >> files for my app either in RAM or on an expansion card.
> >>
> >> The user will install the .prc file and two or more from a set of .pdb
> >> files.
> >>
> >> If the pdb files go on the card, they wind up in /PALM/Launcher, which
> >> is ugly.  They should go into /PALM/Programs/myapp, but that requires
> >> copying them on the first execution of the program, which is slow and
> >> ugly.
> >>
> >> I could give them a different extension and register it with VFS so
> >> they install directly into /PALM/Programs/myapp.  But that requires
> >> telling the user to (1) install my app, (2) run it once to register
> >> the extension, and then (3) install the databases.  They have enough
> >> trouble installing files as it is.
> >>
> >> Also the user will no longer be able to install the files by
> >> double-clicking on them; they'll have to run the Install Tool
> >> explicitly.  And then I'd have to rename the files to .pdb. Presumably
> >> there's a way to do that if they're in RAM but I don't know it yet.
> >>
> >> Any suggestions for how to make this installation process nice would
> >> be appreciated.
> >>
> >> Do other apps deal with this problem?  How?
> >>
> >> --
>

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

Reply via email to