If you want to improve the look & feel for the code in your xojo.com IDE you might want to give JetBrains Mono Font a try. You can download it for free here.

This how a sampe code looks like in the IDE in the standard font

Image for post
Image for post

After having installed the font on your system, you can use it in your IDE by changing the system font in the preferences of the XOJO IDE.

Image for post
Image for post

Your code will now show the newly installed JetBrains Mono font, which is far better readable and monospaced.

Image for post
Image for post

Homebrew will not getting port to the ARM architecture anytime soon, as work on ARM has been running for many years (see the timeline here). But a lot of Formulae have alread been shown to work with the Rosetta 2 emulation on the M1 processors from Apple.

But how can I install homebrew on Apple Silicion? The command for installing homebrew is:

So let’s start a terminal window on Apple Silicon an and running this bash command … unfortunately you will get the following error message(s):

Homebrew is not (yet) supported on ARM processors! …


Increasing the size of a volume, connected to your droplet, is easy with digitalocean.

Note that it is recommended to shutdown your connected droplet before resizing a volume.

Image for post
Image for post
Image for post
Image for post

The only issue is that though you increased the size of your volume, the newly available space will not reflect into any of your droplets until you have changed the partition table. But this is as easy as running one simple command, if your partition is ext4-based:

sudo resize2fs /dev/disk/by-id/scsi-MY_VOLUME

More information can be found here: https://www.digitalocean.com/docs/volumes/how-to/increase-size/


If you are generating a lot of files in Xojo to be downloaded, it makes sense to zip your files, so that the end-user has only to download one file.

You can easily achieve this with MonkeyBread’s MBS Plugin: ArchiveWriterMBS, which you can download here.

The following code is showing how to create 3 text files in-memory. These files are then getting compressed in-memory and then automatically downloaded. This project is for Xojo Web 2.0 but will work as well for Desktop Apps with a few changes.

You need to create the following properties in Xojo’s IDE:

Image for post
Image for post

If you want to use the fantastic DynaPdf Xojo Plugin from MBS be aware that you have to tell the plugin where to find the fonts.

It is documented in the plugin but a bit hard to find, and that sad news are that you won’t get an error message, the creation of the pdf is just not working.

Installing the Microsoft fonts on Ubuntu

It is a simple as executing the following command:

You will find the newly installed fonts under the following path:

/usr/share/fonts/truetype/msttcorefonts

Image for post
Image for post

Customization in Xojo

Ensure that you are telling the plugin where to find the fonts. In the above example your Xojo Code has to look like follows:


In Xojo it is easy to sort one-dimensional arrays. You just write: yourArray.Sort and you are done.

Things are getting a little bit more complicated, if you have to sort so-called multidimensional arrays, means an array with multiple values. Out-of-the-box Xojo can’t sort these arrays.

But with a simple re-design of your application it is relatively easy to get this achieved. You can store your values in an own class, and the instances of that class in an one-dimensional array.

Now Xojo can’t sort this one-dimensional array either, because it contains classes and not strings for instance, but you can write an own method to sort your array, as I will show below. …


R.I.P.

Corona doesn’t make one smarter … :-)

Image for post
Image for post

With the Xojo Script language you can build scripts which are either executed before of after the build of an application. We are using this feature — in combination with a small bash script — to mimic the deployment to the Xojo Cloud with an own server.

Image for post
Image for post
The Xojo Script has to be positioned after the Build Step on Linux
Image for post
Image for post
Example Code of the Script (executing the local Shell script)

Linux Script

Below is the content of the ‘deploy.sh’:

Image for post
Image for post
Photo by Mahir Uysal on Unsplash

In Xojo’s new Web Framework 2.0, you need to use a special renderer “WebListBoxImageRenderer” to easily add pictures to a WebListBox:

Image for post
Image for post
Photo by pine watt on Unsplash

About

Jeannot Muller

Managing director at teccompanion.com, physician, founder, developer and blogger.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store