Question

I'm creating my own DB-aware grid control for Delphi 7. In DBReg unit Delphi registers the property editors for db-aware controls but almost all of them are local types, so I cannot re-use them:

TDataSetProperty
TNestedDataSetProperty
TDataSourceProperty
TLookupSourceProperty
TLookupDestProperty
TLookupIndexProperty
TLookupFieldProperty

Why they are local types and does it change in newer versions of delphi? And is it a good practice if I just copy it to my unit?

Was it helpful?

Solution

I expect that the designers confined these classes to implementation sections to ensure that other developers were not able to use them.

Does it change in newer versions of delphi?

In XE3, and presumably in all other versions since Delphi 7, these types are still confined to the implementation section of DBReg.

Is it a good practice if I just copy it to my unit?

No it would not–that would be a clear violation of the Delphi license.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top