Insert Text Condition depends on direction of selection.

Please post bug reports for earlier versions of Help & Manual (3 and 4) here, along with reports for TNT.

Moderators: Alexander Halser, Tim Green

Post Reply
Peter Robertson
Posts: 26
Joined: Sun Jul 20, 2008 8:33 am

Insert Text Condition depends on direction of selection.

Unread post by Peter Robertson »

In any page, type a line of text:

This is one.

select "one" and click "insert conditional text". The dialog appears with IF selected.

Tick "User Defined 1" and click OK. The text is correctly made conditional.

Now type the word "two" immediately after the END marker. This leaves the cursor to the right of the word. Select "two" by typing Ctrl+Shift+left (or wiping the cursor from right to left).

Now when you click "insert conditional text", ENDIF is selected, and if you click OK, nothing is changed.

If, before clicking OK, you actively select IF, it inserts that, but not the corresponding END.

It seems you must select from left to right for this to work. This is very annoying as the cursor is almost always at the right because I've just typed in the new conditional text. Selecting from the left then involves more work than selecting from the right.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

This will only happen if your new condition starts directly after the END tag of the previous one. What is happening is that when you select to the left you like this the END tag is being included in the selection and so the ENDIF tag is preselecte.. This will be checked out but it may be difficult to fix if the behavior is being caused by the editor engine.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Peter Robertson
Posts: 26
Joined: Sun Jul 20, 2008 8:33 am

Unread post by Peter Robertson »

The end tag is not selected.

I can select either the text I want or that text AND the end tag. Copying & pasting shows that these are different. The problem appears when the end tag isn't selected.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Peter Robertson wrote:The end tag is not selected.
Actually it is, internally, that's the problem -- it is being "included" in the selection that analyzes where the cursor currently is in relation to tags, that's why ENDIF is being preselected. Also, if you switch the ENDIF to an IF condition and insert it will frequently replace the invisibly selected ENDIF tag.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply