> 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. 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.

> And what about internationalizations ?
Use the resource string ofcourse as index (see example).

But I agree, perhaps I should have called it CheckedByCaption instead.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to