Using TStringList.Duplicate - compile error
Hi,
Trying to compile following code in rap :
procedure GlobalOnCreate;
begin
Ordrer := TStringList.Create;
ordrer.Sorted := True;
Ordrer.Duplicates := dupIgnore;
end;
but are getting the following error :
Error:GlobalOnCreate Line 5:Expected to find : '(' or '[' , but found
'Duplicates' instead.
The error text is translated from norwegian back to english so it may not
apear exactly alike in english, but the message should be understandable I
believe.
Why does this error appear? it should be valid code.
By the way I am using RB Enterprise 7.04
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Trying to compile following code in rap :
procedure GlobalOnCreate;
begin
Ordrer := TStringList.Create;
ordrer.Sorted := True;
Ordrer.Duplicates := dupIgnore;
end;
but are getting the following error :
Error:GlobalOnCreate Line 5:Expected to find : '(' or '[' , but found
'Duplicates' instead.
The error text is translated from norwegian back to english so it may not
apear exactly alike in english, but the message should be understandable I
believe.
Why does this error appear? it should be valid code.
By the way I am using RB Enterprise 7.04
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
This discussion has been closed.
Comments
The RAP RTTI system does not know about the TDuplicates enum type. To
register the enum type, add some Delphi code to the Initialization section
of one of your units.
uses
Classes, ppEnum;
initialization
raRegisterEnum('TDuplicates', TypeInfo(TDuplicates));
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
"Visible" in RAP?
On Mon, 10 Jan 2005 10:36:37 -0700, Nard Moseley (Digital Metaphors)
I researched this and you are correct, the Rap for RTTI for TStringList does
not include the Duplicates or CaseSensitive properties. So both the
TStringListRTTI and the Enum need to be updated.
I have created a patch for RB 9.01, you can email
support@digital-metaphors.com and request the patch.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com