Hi,
I have the following piece of code:
for i := 0 to FControlList.Count - 1 do
if Supports(IMyControl(FControlList[i]), IMyControlEx) then
begin
MyControlEx := IMyControl(FControlList[i]) as IMyControlEx;
MyControlEx.DoYourMagic(Self, SomeData);
end;
This code is called many times during my application execution, but in some specific cases it fails inside the Supports() method. And more specifically - it seems to fall inside the QueryInterface() call within the Supports() method.
I checked that FControlList is not nil and FControlList[i] is not nil and it still happens.
Any idea will be appreciated!!!