Re: Can't understand why these exceptions occur...
- From: Ikke <ikke@xxxxxxx>
- Date: Sat, 31 May 2008 18:31:26 GMT
Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx> wrote in
news:_Sf0k.28$sf2.27@xxxxxxxxxxxx:
<snip>
You need to fix your logic a bit here.
Would you care to elaborate why?
I assume the LoadCache is where you initiate the
buffer file.
Partly. I try to read the buffer here, if there is no buffer, nothing needs
to be read.
You need to create the file... if it does not
yet exist!.
Why? I'm only reading a file if one exists?
AssignFile(cache, CacheName);
If FileExist(cacheName) then
Begin
.....
as you were;
End else
Begin
// Clear all buffers to indicate an empty state.
Rewrite(Cache); // < Thats the magic call! :)
End;
CloseFile(Cache);
etc..
Reset assumes an Existing file, Rewrite just starts a
new file and replaces and existing one.
Yes, but the reset is only executed if the file exists, so I don't see the
problem here...
Thanks for the reply!
Ikke
.
- References:
- Can't understand why these exceptions occur...
- From: Ikke
- Re: Can't understand why these exceptions occur...
- From: Jamie
- Can't understand why these exceptions occur...
- Prev by Date: Re: Can't understand why these exceptions occur...
- Next by Date: Re: Can't understand why these exceptions occur...
- Previous by thread: Re: Can't understand why these exceptions occur...
- Next by thread: Re: Can't understand why these exceptions occur...
- Index(es):
Relevant Pages
|