*&^ API2! unwanted property changes

Thought I had sucessfully managed to use a newer Xojo on an API1 project without changing the code.

Sadly, I found that it still managed to mess things up.
Properties like FocusRect became HasFocusRect, with a default property of true
So despite all my existing controls being set to false, the compiled app suddenly has unwanted focus rectangles all over the place. I know it’s been said before, but API2… sigh.
Hasheading, autohidescrollbars… the list goes on.

I get it right that you took an existing API1 project that you converted to API2 (using the “Convert project to API2” menu or equivalent), correct?

IMO, Xojo could easily map API1 to API2 properties and keep their existing values, but doesn’t (I’m referring to your description, since I’ve not encountered that myself). Filling a report (Issue) seems to be a good thing here, as it’s clearly undesirable, and, I think, easy to fix.

No, I took an API1 project that I have been working on in Xojo 2018 (Mac) and 2015 (Windows)

For ‘last years stuff’ I have been compiling in 2021(Mac) and 2015(Windows) while I finish addressing graphics issues in Windows that have been trouble since GDI+ was dropped.
(I think I have enough workarounds now, and will be compiling in 2023 in future)

Somewhere along the line I must have opened and saved in a version of Xojo that really really wants me to use API2, and it has added / changed a lot of properties without asking. I thought it was supposed to see that the project was API1 and leave it alone.

I’m currently working backwards to find the last uncorrupted version , so that I can back port recent code changes.

It’s not worth logging a bug. Xojo will either say it’s my fault, or do nothing.
I guess Im just ranting, and warning folks to be careful… its so easy to hit save by accident.

2 Likes

Leaving it alone means not removing the API 1 properties from the project. It still needs to add the new ones for you to write to on it.

What control is this?

I see difference but all are set to the same True/False as what was saved with old Xojo API1:

AutoDeactivate → Allow Auto Deactivate
BackColor → Background Color
Border → Has Border
and so on.

Are your controls (or some of them) now ‘Desktop’ controls?

Nope.
The problems include listboxes , canvas’ and textboxes - to me, focus rings look intrusive and ugly.
The changes were introduced either by 2021R1 , 2021R3, or 2023R4

I have managed to recover a working app now
(some things actually started working incorrectly as a result - too many to try and debug the affected project)

Arbed shows this… changes only caused by open & save.
No conversion was requested or suggested.

1 Like