> > I am currently using a case statement to change the buttons, but
> > thats a bit
> > long-winded if there is a better way.

> I wouldn've thought the 'Sender' technique was the 'better way', but I
> assume I'm missing something.

The one situation I can see that you might not want to send the Object
itself
if for simplifying an iteration process... I would probably extend one of my
list
objects to implement (in fact I think I will ;) sort of a
HigherOrderFunction ala LisP)

procedure ForAll(Action :TIterationAction; const Data :array of const);
procedure ForIndexes(Action :TIterationAction; const Indexes :array of
Integer; const Data :array of const);

where

TIterationAction = procedure(Object :TObject ; Index :Integer; const Data
:array of const);

This would eliminate the hassle of enumeration in a case statement and avoid
the issue of searching the component list for a tag to retrieve the object.
The list
can also free it's contents on delete/destroy if so desired.

> Could you show us some more code?

On the issue of 'Send more code' I cannot stress this more... Being concise
is good for
bandwidth ONLY if the supplied code is sufficient to explain the question
otherwise the
more code the better... People in this list contribute regularly to each
others problem
solving processes and unless you have some truly novel technology you
needn't worry too
much about people stealing code since you can simply return the favour...
In this instance
it is unclear why exactly the Sender option is impractical especially since
it appears to be
your own class you are modifying...

--
Aaron@home


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to