[fpc-devel] property syntax extension

Paul Ishenin webpirat at mail.ru
Sun Oct 21 15:55:45 CEST 2007

Florian Klaempfl wrote:
>> Only that the codetools can not use a ppureader.ppu from the RTL or
>> FCL. It can use the ppureader.pas, but not the .ppu.
>> Or use the XML approach as Florian
> I suggested :) Paul didn't like it that much
> He started also a wiki page: http://wiki.freepascal.org/Property_attributes
I still thinking that RTTI is much more useful than separate files. To 
use separate files you need some framework to find them and parse. If it 
is RTTI then existing tools can be easily extended to use new feature. 
In case of Lazarus ppu, xml, rtti is not so different.

But lets think of other applications of property attributes. For example 
FastScript components (scripting engine of FastReports co.) use RTTI to 
automatically describe pascal classes in order to use them in script. 
Property attributes can store descriptions, value area, and another 
useful info.

Or my example with database components.

TxxxDatabase = class
property TransactionModel: TTransactionModel attributes ['engines: 
ms-sql, oracle, sybase-asa'];

Using such attribute database components can easily check whether this 
property applied to current engine.
If this is stored in ppu, xml it will not used by component developers. 
And once again - for Lazarus it is not a big difference.

Best regards,
Paul Ishenin.

More information about the fpc-devel mailing list