> On the other hand......the solution you suggest is very good and you have
> guesstimated perfectly what is going on Aaron (possibly a detective in
> former days).

<IMHO>
No I've had to teach a few people Delphi recently though and similar
misconceptions
about the semantics of Objects versus primitives and similar learning
processes
around the anatomical features of VCL classes...

If you're looking at doing a lot of this delphi work you might want to look
at
putting the effort into implementing your code a lot more generically such
that
there is little reference to external scopes but rather using parameters and
class properties.

Using a collection object to handle things like the groups of speedbutton to
avoid
complicated verbose case statements.

> It is a nice feature that Delphi maintains a global variable in the tag
> property. I use it a lot, but in this case it was forgotten about.

It's not global and that's one of its key strengths... You have to
explicitly express
which objects tag and as such you are less likely to blunder through and
mess
up a load-store-load process during maintenance changes... Also you are able
to alter behaviour more easily purely because of this encapsuled nature
rather than
having to say add a second global and adjust all of the procedures
referencing
the global.

globals are considered bad and while I don't agree that all global use is
bad I have
found the use of globals notoriously increases the cost of upscaling or
maintenance
of code in most cases.
</IMHO>
--
Aaron@home

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

Reply via email to