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
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.
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.
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.
ToString(), AsString(), StringValue(), StringFrom(), FromString(), …
I can see a lot of choices.
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.
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).
I peeked out of curiousity and this is super easy to do with @Thomas_Tempelmann’s Prefs Editor
Are there other settings that are not exposed?
Now wait a minute here, buddy. Why is that app working in Dark Mode??
Because you got Dark Mode mostly working, my job is the Hex editor
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
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.
For macOS, I found it in:
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?
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.
Edit: I see someone beat me to it, sorry
For double-buffering, it’s
PaintAt(TwoCoats as Boolean)
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.