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

110 阅读1分钟

Created by Jerry Wang on Feb 25, 2015

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?

 

clipboard1

 

 

 

Test

 

I manually change the content:

clipboard2

 

And click back button:

clipboard3

 

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

clipboard4

 

 

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.

clipboard5

 

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

clipboard6

 

 

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

clipboard7

 

 

Reason why manual content is NOT overwritten

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.

clipboard8

 

Simulate the overwrite case

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

clipboard9

 

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 ):

clipboard10

 

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

clipboard11