Update Controls to API 2.0 dicarded all DesktopLabel.Text's?

I used the “Update Controls to API 2.0” Function to update a huge Project to API 2.0.
After many days of also updating my Code to API 2.0, i am finally able to run this Project again.

To my great surprise, all text information on all labels has been lost. All Text’s have been replaced with the text “Untitled”. :frowning:

Do I now have to manually re-text thousands of labels? :disappointed:

I reported on this in my earlier thead about experiences of converting API1 → API2. Then I made another thread after completing my conversion. As I said there, I think it’s caused by that we had to change .Text to .Value perhaps during 2019. This has left controls such as labels with both Text and Value properties, which are confusing the conversion process.

My conclusion was that one should, if necessary using a text editor outside Xojo, go through all such controls and manually rename any Value properties as Text ones so you end up with only one property (Text) instead of either one or two (Text and/or Value).

This should be done before attempting the main conversion process.

Threads were “API1 to API2 conversion experience” and “What happened to my lost property values?”

2 Likes

Thank you @TimStreater for your fast reply and detailed explanation of the possible reason.

For my big Project it’s too late. I will have to re-text all those Labels :disappointed:
But because this all is VERY important information and a serious flaw of the conversion process, Xojo should find a way to make people aware of such possible issues.

Anyway, have a nice weekend @TimStreater :slight_smile:

2 Likes
if theLabel.Value<>"" then
// use the value property
else
// use the text property
end if

should quite easy to implement in the xojo conversion process ?

2 Likes