More thoughts...
If you are trying to find a particular object then you will be out of luck as the 
items in a case statement have to be constants. IMHO stick with if-else for this sort 
of thing.

Chris

> -----Original Message-----
> From: Chris Milham 
> Sent: Friday, 22 November 2002 10:27 a.m.
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Case Statement
> 
> 
> You should be able to if you cast to a 32bit unsigned ordinal type.
> Try the following:
> 
>   case longword(Sender) of
> 
> HTH
> 
> Chris
> 
> > -----Original Message-----
> > From: Alistair George [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, 22 November 2002 10:11 a.m.
> > To: Multiple recipients of list delphi
> > Subject: [DUG]: Case Statement
> > 
> > 
> > Hi all.
> > Can I do a case statement with sender? The following is 
> > wrong, but you know what
> > I mean:
> > 
> > Proc setupparams(sender:tobject);
> > case sender of
> > Option1:
> > Option2:
> > Option3:
> > end;
> > 
> > cheers,
> > Al+
> > 
> > --------------------------------------------------------------
> > -------------
> >     New Zealand Delphi Users group - Delphi List - 
> > [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED] 
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> > 
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to