Thema: Delphi Array of Boolean Problem

Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#10

AW: Array of Boolean Problem

  Alt 22. Aug 2011, 12:19
Zitat:
Delphi-Quellcode:
procedure TMyForm.chBoxClick(Sender: TObject);
var
  CtrlIntCap: Integer;
  MyHandler: THandler; //wo wird der instanziert?
begin
  if Sender is TCheckBox then
  begin
    CtrlIntCap := StrToInt(TCheckBox(Sender).Caption);

    if (CtrlIntCap <= 18) and (CtrlIntCap >= 11) then
      MyHandler.SetPosition(CtrlIntCap);
  end;
end;
Da fehlt ja wohl ein Konstruktor-Aufruf von MyHandler, oder?
.. und ich schätze mal, dass sowohl die Variable als auch der constructor/destructor-Aufruf in das Formular gehören. Sonst macht der Code nämlich keinen Sinn.
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat