[EMAIL PROTECTED] wrote:
What would be the use of a index by Caption ? (At least I think you
mean Caption, since the internal checkboxes don't have a name)
That is one of the problems, see the next code to clarify the use;
if EditorOptionsGroupBox.CheckedByName[dlgUseSyntaxHighlight] then
PreviewEdits[a].Highlighter := PreviewSyn
else
PreviewEdits[a].Highlighter := Nil;
It's full of thes constructs in the code. Now I could first get the index
by code and then check the checked poperty by code, but that would require
some 40odd more lines and variable declarations. A bunch of redundant code
if you ask me, and it obfuscates the true meaning of it.
Thats why you usually create a func/proc for it.
I could ofcourse
make a function in the unit that wraps that, but that's what I did in the
inc file. And the inc file seems a more appropriate location.
IMO it can be perfecly added as local form method and no need to add it
in an inc.
But back to the basic question, what is the need: Why index by name ?
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives