[Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

Tony Whyman tony.whyman at mccallumwhyman.com
Fri Oct 14 10:08:40 CEST 2016


On 14/10/16 06:43, LacaK via Lazarus wrote:
> I do not know IBX, but don't you use overriden 
> TDataSet.InternalInitFieldDefs ? It will allow you put extra info into 
> FieldDef and then use overriden TDataSet.CreateFields, which will 
> allow you pass extra info from TIBFieldDef into TIBStringField for 
> example ...
> (AFAICS Zeos do it in this way also)
That is basically what IBX does. My point is that it would be better to 
put the passing of the extra info into a subclassed TFieldDef rather 
than have it in TIBCustomDataSet. After all, isn't the whole point of OO 
programming to group related functionality into the same class. If you 
recommend subclassing the TFieldDef then surely it makes sense to make 
CreateField a virtual method.


More information about the Lazarus mailing list