Will converting to API 2 be mandatory in next future?

The information about their design choices was in one of the forum threads during the initial testing phase. One of the first things they did was come up with a style guide and then find the things that didn’t match. So things like Ceil became Ceiling and HasBackColor became HasBackgroundColor. Str is an odd one because the expanded version would be String, which isn’t acceptable. Format already exists, so their options for renaming were pretty limited. It’s also possible Str was just overlooked and it’ll get changed later, but I think that’s unlikely.

Interestingly, there are no instances of Str in my project at all, which leads me to believe it was originally deprecated, because it’s unlikely I would have caught them all on my own if the analyzer wasn’t warning me about them. That bodes well for it being intentionally spared from the API2 sledgehammer.

1 Like

Interesting…

I found the moment you save the project, it loses the API 1.0, so the next time you open it. it’s API 2.0 only. I filed a bug report and notified Geoff (some time ago about it).

Thank fully Bob’s trick posted on t’other forum has bought back autocomplete and now this daily grating is over for me at least.

4 Likes

You can perfectly well keep your API 1.000 code, and add API 2.00 (which you have autocomplete for) to your project.

I, for one, thanks Xojo of providing these steps, and others hints which show that API 1 is still available and somewhat supported by Xojo.
I fail to see how these efforts can’t appease anyone who bothered about the move to API 2.

1 Like

ToString(), AsString(), StringValue(), StringFrom(), FromString(), …
I can see a lot of choices.

1 Like

Switching editing autocomplete modes during the edition could be great. Defaults to API 2 when opening a project, but with something like alt+E 1 and alt-E 2 (⌥E1 ⌥E2 for mac) we could go back and forth.

3 Likes

For those that want to force the API 1 to always show in the AutoComplete open the Xojo prefs file and make sure the key “Show Deprecated Autocomplete Items” is set to true. That should allow you to continue seeing API1 calls in autocomplete in newer versions of Xojo. This isn’t exposed in the IDE preferences (I think it should be).

9 Likes

I peeked out of curiousity and this is super easy to do with @Thomas_Tempelmann’s Prefs Editor :slight_smile:

Screen Shot 2022-05-05 at 10.41.48

8 Likes

Are there other settings that are not exposed?

1 Like

Now wait a minute here, buddy. Why is that app working in Dark Mode?? :smile:

4 Likes

Because you got Dark Mode mostly working, my job is the Hex editor :upside_down_face:

4 Likes

Wow, hip, hip, hooray! Many, many thanks to @Bob_Keeney3, @Tim_Parnell, and @Thomas_Tempelmann for unlocking the secrets of this non-obvious but blindingly useful option and making it so easy to do :joy:

7 Likes

On Windows, the preferences are found in the registry, in HKEY_USERS. Using Regedit, search in keys for Xojo as a full word . Set the value of to 1 in order to see deprecated autocomplete.

1 Like

For macOS, I found it in:

/Users/tim/Library/Preferences/

and I can change it with a text editor. Not that I need to, as I’m API2 only now, but it’s good to know what is stored there.

So would a quick fix be for Xojo to expose that item in preferences? Is there a feedback item? @Paul_Lefebvre?

2 Likes

Should definitely be a preference we can set in the IDE if the recommendation is to wait for project conversion until needed. I’ve personally been converting things as I come to them, but I know many others aren’t doing that.

1 Like

PaintAt()

Edit: I see someone beat me to it, sorry :slight_smile:

1 Like

For double-buffering, it’s

PaintAt(TwoCoats as Boolean)

7 Likes

Uh, you shouldn’t change preferences (.plist) files directly in macOS, because the system (cfprefsd) keeps a cached version of the prefs and may overwrite your file changes. That’s why I made Prefs Editor. Or use the “defaults” Terminal command.

1 Like