Re: Can't understand why these exceptions occur...



Ikke wrote:

Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx> wrote in
news:Fng0k.34$sf2.0@xxxxxxxxxxxx:

<snip>

Only thing that looks suspicious to me is the record.

Maybe you should try making it a packed record to prevent any gaps or
so...


I didn't know what packed was - I've looked it up. Even though this is something very useful which I intend to use more often (thanks), I doubt this is the cause of my problems.

In fact, I've just verified it, and it didn't make a difference...


type
TBufferInfo = packed Record // *new*
name : String[255];
size : Int64;
End;

I don't use "file of"... I use TFileStream ;)


Thanks.

<snip (reply by Jamie)

and if you were really looking at it close enough you would
of seen that he wasn't creating a file to start with if one
did not exist!


As I've already replied to your other post, it's not meant to create a file. LoadBuffer loads the file only if it exists, SaveBuffer always saves the file.

I still don't understand why I get this exception...

Thanks,

Ikke
because you close a file that does not exist!


--
"I'd rather have a bottle in front of me than a frontal lobotomy"

"Daily Thought:

SOME PEOPLE ARE LIKE SLINKIES. NOT REALLY GOOD FOR ANYTHING BUT
THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS.
http://webpages.charter.net/jamie_5";

.


Quantcast