Has Anyone Used AI Specifically to Convert API1 Desktop Apps to API2?

What the title says. I have a mountain of technical debt in a dozen x-platform (Windows/Mac) apps created in 2021r2.1 that needs to be dealt with at some point.

Would be happy to hear of others’ experience if anyone’s done this with AI as opposed to the built-in migration tools and manual editing.

1 Like

No I haven’t.

But if I were to do it, I would ask Claude to write a skill to do it.

Verify the skill contents and reverify with api1/2 control differences. Apply the skill on a small project and visually compare both running apps.

One of the issues in converting a control from api1 to api2 is that Xojo might silently ignore a control’s property if it isn’t valid.

2 Likes

I guess one of the most annoying things to resolve will be event renaming…

No, this would be nice.

Locale is new, many string commands are used differently / maybe have a name change: NthField, Right,… look at String in the doc for the list… They now are used as this String.NthField(, String,Right(

The way to det a string position have changed too (both name and parameters)…

At last, the documentation have changed too (and I am quite sure it is for the worse).

BTW: even the auto complete in the IDE may work differently. With a project created under API “1”, you will get the list for the Two API (in Red: old one: do not use it !), and the new in black; so sometimes you can guess correctly, but most of time you have to seach in the doc and take your time: I do not found too many times what I searched and it was on front of me !

Good luck, and remember: this is a Marathon race, not a 100 meters (that is why I wrote “Take Your Time”).

1 Like

I’m not overly concerned with deprecated syntax, in fact I’d rather keep Dim instead of Var :slight_smile:
I generally use dot notation - string.Right vs Right(string) - anyway, but again don’t really need the latter changed to the former.
I primarily just want my apps to load, compile, and run properly under the latest Xojo. So “desktop” everything, new event names, and resolution of event name conflicts.

I completely understand that and it’s what I had to do for my iOS apps.

New event names and name conflicts are usually simple find/replace operations.

But the most tricky part are control properties.

For example:

Pushbutton.MacbuttonStyle is an integer.

DesktopButton.MacButtonStyle is a MacbuttonStyles enum.


That’s why creating a Claude skill is an interesting idea, it can be improved each time you notice a conversion mistake and re-run the conversion.

1 Like

teasing…


currently made alone 3400 warnings->244 …

1 Like

I’ll probably need to make it aware of all my extension methods - I have many hundreds in modules for Strings, Arrays, ListBox, etc.

no need you can make it fully generic. it’s a claude code agent after all.

1 Like