Subject | Re: [IBO] TIB_DataSource.onDataChange |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-12-28T10:45:46Z |
Hello Ulrich,
OK for testing purposes, but you'd better turn it off in release
versions.
if Field <> nil then if Field.FieldName = 'myField' then
Greetings,
Paul Vinkenoog
>> [ Marco: ] you should first check if field is nullYou obviously have full boolean evaluation on, then. This can be
>> 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.
OK for testing purposes, but you'd better turn it off in release
versions.
> The following code do what I like to do :If it's OK to exit, that's a solution. If not, use nested ifs:
>
> If Field=nil then exit;
>
> If Field.FieldName='myField' then...
if Field <> nil then if Field.FieldName = 'myField' then
Greetings,
Paul Vinkenoog