为什么CRM里用户输入的文本不会被text determination覆盖掉

155 阅读1分钟

why the user input text will not be overwritten by text determination procedure

For example all of the below 3 texts are automatically determined. When I manually change the content of the first text, why my manual change will persist and not overwritten by text determination procedure?

{width=“5.334522090988626in” height=“2.4005347769028873in”}

[Test]{.underline}

I manually change the content:

{width=“3.6274748468941382in” height=“2.240498687664042in”}

And click back button:

{width=“4.827742782152231in” height=“1.240275590551181in”}

Please keep in mind, that in this case the text determination procedure is STILL triggered:

{width=“5.334522090988626in” height=“2.1071358267716533in”}

The global variable gt_xthead stored the current four text objects’ content in memory. For O003, it does not have language specified since there is no determination result for it.

The content of each text is stored in internal table LINES.

{width=“2.9339873140857393in” height=“1.2469444444444444in”}

In our example, we are making changes on O001E, double click on the internal table LINES, and we will find our manual input there:

{width=“2.860637576552931in” height=“0.746832895888014in”}

[Reason why manual content is NOT overwritten]{.underline}

For all three text objects which have already been determined successfully, the condition in line 206~208 will NOT fulfill, so the text redetermination will NOT occur, thus the user manual input will persist.

{width=“5.334522090988626in” height=“2.187153324584427in”}

[Simulate the overwrite case]{.underline}

It is easy to simulate the overwrite case, just force the code to be executed starting from line 210 via debugger.

{width=“5.334522090988626in” height=“2.640588363954506in”}

{width=“6.91597987751531in” height=“0.31450787401574803in”}Then you can find the first entry( for our manual input ) is marked as Deletion, and the text determination is re-executed and the

standard text template content is re-filled ( Insertion ):

{width=“5.334522090988626in” height=“1.607024278215223in”}

Click F8 to continue, and you will find our manual input is gone, instead the standard template content is displayed again.

{width=“5.334522090988626in” height=“2.4072025371828523in”}

image101
image102
image103
image104
image106
image107
image108
image109
image110
image113
image115
image117
image121
要获取更多Jerry的原创文章,请关注公众号"汪子熙":