cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in TouchGFX 4.25: Issue when duplicating a TextArea with manually assigned ID

AAlis.23
Associate III

I’ve encountered a bug in TouchGFX version 4.25 when working with TextAreas. If you manually assign an ID to a TextArea, such as "id_txt_config_ntp", and then duplicate the TextArea (using copy and paste), the second generated one remains linked to the first. Even if you change the ID of the second one, any modification made to either of them affects both. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @AAlis.23 ,

 

Ok sorry, I understand the issue now.

Whether you create a textArea by copy-pasting or by creating a new textArea, as soon as you assign a textID to your textArea, you will modify that textID.
So if as you say, you change the textID in the second textArea, what you will actually do is to change the textID name but you won´t create a new textID so they will still be "linked".

If you want the 2 textArea to not be linked you need to assign them 2 different textID. By default it is auto-generated but if you copy-paste or assign an existing textID they will  get linked, to unlink them, you have to un-assign the textID by clicking on the cross called "Deselect text".

GaetanGodart_0-1741685883786.png
Then you can keep the text ID auto-generated or you can assign a new textID.

 

I hope I understood correctly this time and that I answered your question/solved the issue.

 

Regards,

 

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

5 REPLIES 5
GaetanGodart
ST Employee

Hello @AAlis.23 ,

 

This behavior is the same on TouchGFX 4.24.0.

I think this is not a bug.

When you create a textArea, assign a text to it and set the ID of it, if you create another textArea with the same textID, both textArea will display the same text because they have the same textID.

When you create a textID, a specific set of characters are linked to that ID, so when you add that textID to a different textArea, it will show the same text.
Also, when you change the text assigned to the textID (whether you do it in the initial textArea, in a different textArea or in the text and typography tab, the change will be reflected on all the occurence of the textID.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
AAlis.23
Associate III

Hi Gaetan,

Yes, but read carefully: "Even if you change the ID of the second one, any modification made to either of them affects both." The behavior you are describing is logical, but changing the ID should unlink the two text areas, yet it does not.

 

Hello @AAlis.23 ,

 

Ok sorry, I understand the issue now.

Whether you create a textArea by copy-pasting or by creating a new textArea, as soon as you assign a textID to your textArea, you will modify that textID.
So if as you say, you change the textID in the second textArea, what you will actually do is to change the textID name but you won´t create a new textID so they will still be "linked".

If you want the 2 textArea to not be linked you need to assign them 2 different textID. By default it is auto-generated but if you copy-paste or assign an existing textID they will  get linked, to unlink them, you have to un-assign the textID by clicking on the cross called "Deselect text".

GaetanGodart_0-1741685883786.png
Then you can keep the text ID auto-generated or you can assign a new textID.

 

I hope I understood correctly this time and that I answered your question/solved the issue.

 

Regards,

 

Gaetan Godart
Software engineer at ST (TouchGFX)
AAlis.23
Associate III

Oh, I see what you mean now. If I change the textID of the second one, the first one also changes, so they stay linked. I hadn’t noticed that before. Like you said, I need to remove the textID first (auto-generate) and then assign a new one. This behavior of being linked is a bit new to me since normally, in any application, you would select both controls instead, but I get its usefulness. Thanks!

No problem @AAlis.23 !
I am glad you can work on your project now!

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)