unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;
type
TForm1 = class(TForm)
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
var
Label1:TLabel;
begin
Label1:=Tlabel.Create(Form1);
Label1.Parent := Form1;
Label1.Visible := True;
Label1.Top := 10;
Label1.Left := 10;
Label1.Autosize := True;
Label1.Caption := 'why cant i see that';
end.
Nie kompiluje się, gdyż:
unit1.pas(26,16) Error: Identifier not found "TLabel"
unit1.pas(26,16) Error: Error in type definition
unit1.pas(29,17) Error: Identifier not found "Tlabel"
unit1.pas(30,10) Error: Illegal qualifier
unit1.pas(31,10) Error: Illegal qualifier
unit1.pas(32,10) Error: Illegal qualifier
unit1.pas(33,10) Error: Illegal qualifier
unit1.pas(34,10) Error: Illegal qualifier
unit1.pas(35,10) Error: Illegal qualifier
unit1.pas(38) Fatal: There were 9 errors compiling module, stopping
Nic nie rozumiem. Jak to: Identifier not found: TLabel?!? Przecież JEST taki komponent! http://wiki.freepascal.org/TLabel Nie mam pojęcia, co za różnica, czy przeciągnę komponent z paska Lazarusa na Form1 i ustawię mu Caption w Inspektorze obiektów, czy stworzę go dynamicznie?