|
<< Click to Display Table of Contents >> Navigation: Telegram > 2023 > 07 > 29 > Telegram_2023-07-29T11 |
2023-07-29T11:45:28
I did more tests trying to find the cause of my issue and below are my findings. A demo showing the problem is attached.
if you have a frame (let's say TIWFrame1) AND this TIWFrame1 contains other \subframes\ created at runtime, AND if you create two or more instances of TIWFrame1 on the same form, you will have issues updating controls within TIWFrame1. This is probably because the subframes on TIWFrame1 will have the same name (on each instance) on the generated HTML output. Thus, you will have duplicates and it breaks IW code that manages these client-side updates
Please look at unit3.pas, line 57
type: pre procedure TIWFrame3.CreateFrames;
var
i: Integer;
lCount: Integer;
lFrame: TIWSubFrame;
begin
lCount := StrToInt(IWEdit1.Text) + ComponentCount;
for i := ComponentCount to lCount - 1 do
begin
lFrame := TIWSubFrame.Create(Self);
// problem
lFrame.Name := 'xxx_Frame' + i.ToString;
// no problem
// lFrame.Name := 'xxx_Frame' + GenerateGUID_ID;
lFrame.Parent := IWRegion1;
lFrame.Align := alTop;
end;
end; language:
2023-07-29T11:46:12
The demo