I think thats right too, and I originally just wrote if (Source is TMyClass)
then...
But then I wanted to make it clear that Source might be Nil (for instance,
you can go Picture.Assign(Nil)), so I just popped it in at the last moment
;-).
Good to know somebody reads these things ;-)
Andrew.
> -----Original Message-----
> From: Aaron Scott-Boddendijk [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, August 24, 1999 12:04 PM
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: TPersistent.Assign override
>
> > if (Source <> Nil) and (Source is TMyClass) then
>
> Doesn't the IS operator return false if the instance is nil?
>
> I thought it was the AS operator that allowed nils through
>
> --
> Aaron Scott-Boddendijk
> Jump Productions
> (07) 838-3371 Voice
> (07) 838-3372 Fax
>
>
> --------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz