Finally, 2021r2 is out! This is a great release full of bug fixes and includes a feature request that I made that should make my YouTube videos a little easier for you to follow along with. Xojo love to state how many bug fixes, changes and features (179 & 41 & 6 respectively) each new release contains but as developers we get that most of these won't affect us. I'm no different and so in this piece I want to focus on a few things that I've found especially useful for my needs. I also want to write a little about the general focus of this release. As always, you can read the release notes for more details.
IDE scripting improvements
Over the last few months I've started using IDE scripting more and more. One use case I have for it is to create doc comments (documentation comments) at the top of every method I create. I've been experimenting with how I want these formatted but typically I want the first line of the doc comment to be mirrored in the method's description. This means that when I hover over a method's name in the code editor I can see an explanatory note about its usage at the bottom of the editor. Before this release, I would have to first write the doc comment and then manually copy and paste the first sentence into the method's description field, often manually removing an intervening
/// as well. I was surprised that the IDE didn't offer a way to use IDE scripting to programmatically set this field so I filed Feedback case 64869. To my surprise, this got added within a single release cycle which was great. Now I have an IDE script that I can run that will automatically figure out a method's description from its doc comment and insert it into the description field. So for those of you who are following along with my YouTube videos will no longer have to watch me cut and paste text into the description every time I create a new method.
I've been working on a code editor control for Xojo (based on
TextInputCanvas) for about 6 months called ACE (the Awesome Code Editor) that I'm just about to open source. I thought it was ready for prime time about two months ago and so I decided to create a small demo app to show off its features. One of the cool things about ACE is its extensive support for themes. At some point in the recent past Xojo moved away from using
SelectColor to show a colour picker to their new
DesktopColorPicker control. After getting my head around its API I had a working demo. The only issue was that the app crashed repeatedly whenever the user tried to change the colour of an item in a theme thanks to a nasty
NilObjectException being raised from within the Xojo framework for the
DesktopColorPicker. I filed a Feedback case and it got fixed really quickly in the early part of 2021r2's testing cycle. This of course meant that I couldn't ship ACE until the actual public version of 2021r2 shipped which is why I'm hoping to open source it very soon.
IDE code completion improvements
Rather than reproduce Xojo Inc's recent comprehensive blog post on these features, I'll simply say that they are really useful and very welcome. They add a nice bit of polish to the IDE and I hope the engineers continue to add niceties like these to the product. The speed improvements in typing and the autocompletion improvements are also very much appreciated. If someone at Xojo could give a bit of love to my requests for better method override support in the autocompletion engine and / or fix the bugs with multidimensional arrays I'd be most grateful.
General impressions of the release
Without a doubt, Xojo have clearly focussed on improving the quality of the product in this release cycle. For too long I believe Xojo have spent a lot of effort on adding new features, sometimes broken ones that remain buggy for too long. I'm really heartened to see so many fixes and refinements in this release and I can unreservedly recommend this as an upgrade to all Xojo users.