Hi all,
Seems to be one problem after another. This time, I have a dynamic array of Variant
When I initialise it I'm using
Which, according to the help file, and to what most other parts of my program are doing, should make FCacheArray a 10 element array, with every element set to the Unassigned constant.
Except for one of my classes. In this case, the first element (FCacheArray[0]), is being initialised to Null, and the rest Unassigned.
Even when I try
It's value remains at Null - even though it should change to Unassigned. If I set it to '0' it changes correctly, but if I set it again back to Unassigned, it changes to.... Null!
I've been unable to replicate it in a simple program with varying array lengths, but it consistently happens in just this one class I have, which unfortunately is hugely complex, so I won't be posting it unless necessary.
I use the Unassigned values as indicators on whether I've fetched values from a database, so it's important. I can get around this by setting up an array of Boolean to match it, but obviously fixing this would be preferable.
I'm using Delphi 6 Enterprise with Update 2, and a RTL 3 update applied. Anyone come across this or know if there's any fixes/patches out there I should have?
Many thanks.
Seems to be one problem after another. This time, I have a dynamic array of Variant
Code:
TMyClass = class
private
FCacheArray = array of Variant;
end;
Code:
constructor TMyClass.Create;
begin
inherited;
SetLength(FCacheArray, 10);
end;
Except for one of my classes. In this case, the first element (FCacheArray[0]), is being initialised to Null, and the rest Unassigned.
Even when I try
Code:
FCacheArray[0] := Unassigned;
It's value remains at Null - even though it should change to Unassigned. If I set it to '0' it changes correctly, but if I set it again back to Unassigned, it changes to.... Null!
I've been unable to replicate it in a simple program with varying array lengths, but it consistently happens in just this one class I have, which unfortunately is hugely complex, so I won't be posting it unless necessary.
I use the Unassigned values as indicators on whether I've fetched values from a database, so it's important. I can get around this by setting up an array of Boolean to match it, but obviously fixing this would be preferable.
I'm using Delphi 6 Enterprise with Update 2, and a RTL 3 update applied. Anyone come across this or know if there's any fixes/patches out there I should have?
Many thanks.