What happened to my lost property values

In my thread where I reported my experience of converting from API1 to API2 recently, I mentioned some property values going AWOL. I think I now know what happened.

I had some number of controls which, due to changes over the last couple of years, had both a Text and a Value property. The Label control is a case in point. And, it’s now clear, in 2021r2.1 the Inspector was displaying what was in the Value poperty.

On conversion to API2 and subsequent save of the project, using 2021r3, even though the conversion happened, the Value property continued to be displayed in the Inspector, and was not removed upon save. Text was not saved either, so that when the project was reloaded, with the Inspector now showing the Text property, it came up as “Untitled”. The Value property was still present in the saved project but was ignored as DesktopLabel has no Value property.

I can see that this is a complication for conversion since for a control like Label, under API1, it would be perfectly possible for the saved project to have saved values for both Value and Text, to have neither, or one but not the other. And if both are present, which then should be taken as the “true” value to be carried forward.

I think the lesson here is that before attempting a conversion, ensure that all deprecation warnings are turned on, and fix them all as the very first step. I wish I’d done that, now.

1 Like