Problems with EditField after upgrade

  • Hi,
    I just intalledWPTools 5 upgrading from version 4.22a and the Editfields are not working properly after the upgrade.
    - Does RTF document with Editfield and created whit version 4 are 100% compatible with version 5.
    - Does EditField's fonctions like MoveToField work correctly in Header and Footer. After a call to MoveToNextField, the WorkOnText properties return to wpIsBody and the first EditFiled in the body was selected.

    Also
    How to keep and recuperate char attr, here what I do in version 4:
    ...
    FieldAttr := WPRichText.CPAttr^;
    ...
    WPRichText.CPAttr^; := FieldAttr;

    • Offizieller Beitrag

    Hi,

    Editfields use a different format in V5 since they are represented by one field, not two. This field is created using two field objects, start and end which makes it look like in V4.
    Mailmerge fields use the same syntax in V5 - there is actually no difference between mailmerge fields and edit fields except for on flag in the TWPTextObj.Mode property

    The fields hsould be imported correctly - I tested that with several documents - if you have one which does not work please send it to me.

    WorkOnText should be not changed but please note that the find routines internally use CodeLocate from unit WPCtrMemo. This function can optionally work gloabally so complicated WorkOnText switching is not required.

    How to keep and recuperate char attr, here what I do in version 4:
    ...
    FieldAttr := WPRichText.CPAttr^;

    FieldAttr := WPRichText.CPAttr.Attr;
    ...
    WPRichText.CPAttr.Attr := FieldAttr;

    is the closest function.

  • Hi,
    1) I still cannot move to EditFields in the Header and Footer. With WPTools4 I used the following commands:

    WPRichText1.WorkOnText := wpIsHeader;
    WPRichText1.MoveToNextField(true);

    now it move to the first Editfield on the Body. How to access EditFields in Header or Footer?

    2) In WPTools4, the start and end charaters of editfield were not supposed to be used in the text, the few tests I made seem to show that it's not the case anymore, is that correct?