CodeListTags wrong results ?

  • I just tried the function CodeListTags, to get a list of all EditFields and i think it has a little bug in it.

    I changed the EditFields Demo, in the Template Editor i entered only a checkbox followed by a MergeField

    If both are in the same line (paragraph) i get both Fields in the List (showing FORMCHECKBOX and COMPANY)
    if i put one of them into a new paragraph, i get only the Field which i have specified in the CodeListTags (parameter Code)

    Code
    list    := TemplateEdit.CodeListTags(wpobjMergeField{wpobjTextObject}, '*ALL*', TRUE);
        for i:=0 to list.Count-1 do begin
            Memo1.Lines.Add(list[i].Name);
        end;
        list.free;
  • I just added a button in the project EditFields :

    Code
    procedure TWPEdTest.Button3Click(Sender: TObject);var    list    : TWPTextObjList;    i       : integer;begin    Memo1.Lines.Add('---------------');    list    := TemplateEdit.CodeListTags(wpobjTextObject, '*ALL*', TRUE);    for i:=0 to list.Count-1 do begin        Memo1.Lines.Add(list[i].Name + ' ... '+IntToStr(integer(list[i].ObjType)));    end;    list.free;end;

    If i click the button (no change in the template text) i get following result

    Code
    ---------------Company ... 1Name ... 1Str ... 1City ... 1FORMCHECKBOX ... 7

    if i enter a manual line break before the Checkbox i get following

    Code
    ---------------
    FORMCHECKBOX ... 7