Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Created March 16, 2017 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/b5e3684f725216622bdcb80bf5f10698 to your computer and use it in GitHub Desktop.
Save jpluimers/b5e3684f725216622bdcb80bf5f10698 to your computer and use it in GitHub Desktop.
Cannot apply ToUpperInvariant to Text property of TEdit: [dcc32 Error] MainFormUnit.pas(29): E2018 Record, object or class type required
unit MainFormUnit;
interface
uses
System.Classes,
Vcl.Controls,
Vcl.Forms,
Vcl.StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
procedure Edit1Change(Sender: TObject);
end;
var
Form1: TForm1;
implementation
uses
System.SysUtils;
{$R *.dfm}
procedure TForm1.Edit1Change(Sender: TObject);
begin
Edit1.Text := Edit1.Text.ToUpperInvariant;
// the above line generates this error:
// [dcc32 Error] MainFormUnit.pas(29): E2018 Record, object or class type required
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment