Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 20.3 ('XDC Anywhere')
Instant purchase and download via GumRoad!


Xojo 2022 Release 1

Code Assistants, iOS Debugging, New Docs, and More

Issue: 20.3 (May/June 2022)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 13,605
Starting Page Number: 26
Article Number: 20304
Resource File(s):

Download Icon project20304.zip Updated: 2022-05-05 14:15:59

Related Web Link(s):


Excerpt of article text...

In April, Xojo 2022R1 was made available and it offers significant improvements in a variety of areas including documentation, iOS debugging, deployment, PDF improvements, and many bug fixes.

Code Assistants

My favorite new feature are Code Assistants. These are XojoScripts you can install in Xojo's Scripts folder and execute on code within the IDE to make changes to the selected text. You access these via a contextual menu when the selected text is appropriate (see Figure 1).

A lot of code is tedious busywork, so you can use these scripts to automate certain tasks. Bundled in Xojo's Example Projects folder (Advanced > IDE Scripting > Code Assistants) are several sample scripts, plus a template you can copy and modify for your own scripts.

While you can open and edit scripts in Xojo's IDE Script Editor, there's no support there for autocomplete, debugging, or even checking for syntax errors. If you need those, you can write and test your code in the Code Assistant Tester project (see Figure 2). Once it's working there, you can copy the code to a separate Code Assistant script file to actually use it.

What can you do with Code Assistants? Lots of things. One of the samples wraps the selected text within an if IsDarkMode construct, while another converts quoted text to a series of CHR calls. (I can imagine a variation that obfuscates strings like serial numbers you don't want visible in the app binary.) Another script expands comments.

...End of Excerpt. Please purchase the magazine to read the full article.