Here's the procedure:
SCAR Code:
procedure TForm1.ComboBox3Change(Sender: TObject);
begin
case (Form1.ComboBox3.Text) of //The ordinal error.
'Black': Form1.RichEdit1.SelAttributes.Color:=clBlack; //The Incompatable types error.
'Grey': Form1.RichEdit1.SelAttributes.Color:=clGray;
'White': Form1.RichEdit1.SelAttributes.Color:=clWhite;
'Cyan': Form1.RichEdit1.SelAttributes.Color:=clSkyBlue;
'Blue': Form1.RichEdit1.SelAttributes.Color:=clBlue;
'Navy': Form1.RichEdit1.SelAttributes.Color:=clNavy;
'Red': Form1.RichEdit1.SelAttributes.Color:=clRed;
'Maroon': Form1.RichEdit1.SelAttributes.Color:=clMaroon;
'Yellow': Form1.RichEdit1.SelAttributes.Color:=clYellow;
'Lime': Form1.RichEdit1.SelAttributes.Color:=clLime;
'Green': Form1.RichEdit1.SelAttributes.Color:=clGreen;
'Teal': Form1.RichEdit1.SelAttributes.Color:=clTeal;
'Dark Green': Form1.RichEdit1.SelAttributes.Color:=clMoneyGreen;
'Purple': Form1.RichEdit1.SelAttributes.Color:=clPurple;
end;
end;
And here are the errors i am receiving:
Code:
[Error] Unit1.pas(237): Ordinal type required
[Error] Unit1.pas(238): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(239): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(240): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(241): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(242): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(243): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(244): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(245): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(246): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(247): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(248): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(249): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(250): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(251): Incompatible types: 'Integer' and 'String'
Please help, as i have no idea how i could receive those errors. I have googled it, and failed. It works in SCAR so there must be a difference. Please help, thanks
Rep++ if you do help