Subject Re: [IBO] IBOQuery: How to create TField for selected fieldsat runtime?
Author Helen Borrie
At 03:48 PM 4/02/2005 -0800, you wrote:

>Thanks Helen for taking the time to respond.
>I already know about native IBO, but I'm talking about TDataSet IBOQuery, not
>IB_Query. Someone already gave me some pointers on using TIB_Column and
>OnGetText with the AfterPrepare event.
>What I still need is the same ability to dynamically assign OnGetText
>event to a
>non-persistent TField of the IBOQuery.

What's a "non-persistent TField"? If you have to write a handler for a
TField, you have to instantiate it before it can be referenced by the
handler, i.e. it is by nature a persistent object.

If you don't instantiate your own field objects in your application code,
Delphi instantiates dynamic field objects for itself, but your code can't
access them. What's your objection to instantiating TFields?

>Any suggestions?

I suppose you could write a class procedure that generically handles
GetData and SetData, but I wouldn't want to go there.

Have you tried accessing the IBODataset's InternalDataset object and
applying the TIB_Dataset methods, etc. to that? It's not recommended for
all things but you might consider experimenting with it for your particular
purpose, since the TIB_Column objects do exist there.