Subject Re: [IBO] TIB_DataSource.onDataChange
Author Paul Vinkenoog
Hello Ulrich,

>> [ Marco: ] you should first check if field is null
>> if ( (Field <> nil) and (Field.FieldName = 'myField') ) then

> [ Ulrich: ] your are right! But testing with "and" leads to an
> Access violation when testing the second condition.

You obviously have full boolean evaluation on, then. This can be
OK for testing purposes, but you'd better turn it off in release
versions.

> The following code do what I like to do :
>
> If Field=nil then exit;
>
> If Field.FieldName='myField' then...

If it's OK to exit, that's a solution. If not, use nested ifs:

if Field <> nil then if Field.FieldName = 'myField' then


Greetings,
Paul Vinkenoog