I should mention I am using Delphi 6 update 2
-----Original
Message-----
Hi there,
I have a record structure say
TFrames = record Desc: shortstring; Side, top, width, height: Integer; Use: Boolean; End;
TImages = record Path: shortstring; Side, top, width, height: Integer; LockAspect: Boolean; Use: Boolean; End;
Trec = record Desc: shortstring; I: Integer; Frames: array of TFrame; Images: array of TImages; End;
Now when I resize the frames or images I use SetLength(Frames, Length(Frames) + 1); SetLength(Images, Length(Images) + 1);
Now this seems to work fine, except, if I have frames and then add a frame, sometimes the images gets corrupted, like if I had 5 images [0..4] and do a resize to Frames sometimes a images[2] will be duplicated to position 2 and 3, really weird, anyone had any problems with dynamic arrays like this?
Jay
|
- [DUG]: Dynamic arrays Luke Pascoe
- Re: [DUG]: Dynamic arrays Paul Spain
- RE: [DUG]: Dynamic arrays Nahum Wild
- RE: [DUG]: Dynamic arrays Luke Pascoe
- Re: [DUG]: Dynamic arrays Peter Huebner
- Re: [DUG]: Dynamic arrays Paul Spain
- [DUG]: Dynamic arrays Jason Coley
- Re: [DUG]: Dynamic arrays Jason Coley
- Re: [DUG]: Dynamic arrays Paul Mckenzie
- RE: Re: [DUG]: Dynamic arrays Jason Coley
- RE: RE: Re: [DUG]: Dynamic arrays Kyley Harris
- RE: RE: Re: [DUG]: Dynamic arrays Jason Coley
- RE: RE: Re: [DUG]: Dynamic arrays Jason Coley
- RE: RE: RE: Re: [DUG]: Dynamic arrays Kyley Harris