Title: RE: [DUG]: Syntax again please

Mmm. Some thoughts rather than a solution:

1) Can't fathom what sender is. What is sender (its usually a Tobject ... a pointer to a block of memory)?
   TChecklistBox(CheckListBox12).index is probably an integer. Therefore is sender an Integer (seems odd). You can convert an Object to an Integer (an address ... but you seldom, if ever, would want to);

2) Can't see why you would TChecklistBox(CheckListBox12). CheckListBox12, I would think, is already a Tchecklistbox. The typecast is like saying Convert into an apple this apple. Why bother?

3) sender = TChecklistBox(...) is OK. That tests if the object I am working on over here, is exactly the same as the one you are working on over there. But, forget the typecast. If (sender is TChecklistBox) checks that sender is a TChecklistbox. ie This piece of fruit is a pipfruit.

Heres a translation for you:
Original: if  sender = TChecklistBox(CheckListBox12).index ..
Fruity translation: IF that_thing is_the convert_into_Pipfruit(This_banana)'s core ...

Hope I have not completely misread your code snippet and that this helps.

Cheers.

-----Original Message-----
From: Alistair George [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 April 2003 8:24 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Syntax again please


Hi can anyone tell me how to do this correctly:
//External procedure:
if (index = 1) then WriteSettings(Sender, '');

Writesettings:
if sender = TChecklistBox(CheckListBox12).index
//(want to check the index of the sender in above)

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/
Notice of Legal Status and Confidential Information: This electronic mail message and any accompanying attachments may contain information that is privileged and CONFIDENTIAL.  If you are not the intended recipient you are advised that any use, review, dissemination, distribution or reproduction of the information is strictly prohibited and may be unlawful.  If you have received this document in error, please notify the sender immediately and destroy the message.

Reply via email to