Subject Re[2]: [IBO] Accessing Field Contents
Author Nando Dessena
Helen,

>>H> MyIBOQuery.FieldByName(MyGrid.SelectedField.FieldName).PropertyOrMethod
>>
>>MyGrid.SelectedField.PropertyOrMethod should be equivalent.

HB> Good point, if you are using IDE-instantiated field objects

no, it's equivalent in all instances. Look at the code.

HB> It's a good fallback in that case to
HB> take the "longer road" with VCL-to-Dataset references, to avoid getting AVs
HB> on these calls.

FWIW, you'll find that the two constructions share the same risks of getting
AVs, namely if SelectedField isn't assigned.

Ciao
--
Nando mailto:nandod@...