Dňa 14.10.2016 o 10:08 Tony Whyman via Lazarus napísal(a):

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.

Not only IBX I think ;-) I suppose that all TDataSet descendants must follow this, because in Delphi is TFieldDef.CreateField also not virtual. Probably there is logic, why it is designed as is (may be CreateFields/BindFields should care about TFieldDef->TField).

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.

I understand, but I think, that you must care also about persistent fields, where you must hook into BindFields (in all cases there are only 3 lines of code in CreateFields which iteratte over FieldDefs and create field so IMO no big problem override it)


Lazarus mailing list

Reply via email to