Всем привет. Мне нужно сделать так, что бы инсталлятор не выбирал автоматически компонент при выборе другого компонента. Инсталлятор ругается на то, что я обращаюсь к WizardForm до его создания. Как быть?
Код:
function Mod1Check(): Boolean;
var
Index: Integer;
begin
Index := WizardForm.ComponentsList.Items.IndexOf('Mod 2');
if IsComponentSelected('mods\mod1') then
begin
WizardForm.ComponentsList.Checked[Index] := False;
WizardForm.ComponentsList.ItemEnabled[Index] := False;
end else begin
WizardForm.ComponentsList.Checked[Index] := True;
WizardForm.ComponentsList.ItemEnabled[Index] := True;
end;
end;
Код:
Name: "mods\mod2"; Description: "Mod 2"; ExtraDiskSpaceRequired: 0; Check: Mod1Check