Skip to content

Year: 2018

Formatting Your XML

Although Xojo does not have a built-in method to format XML text, you can use XSLT to do this for you. XSLT stands for eXtensible Stylesheet Language. This XSLT can be used to format XML:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<xsl:copy-of select="/" />
</xsl:template>
</xsl:transform>

To use this with Xojo, add a module to your project (name it XMLExtensions), add a String constant to the module (call it kXSLTFormat) and copy the above XSLT into the constant.

Comments closed

#JustCode Challenge Week 9 – Quote Web Service

We’re wrapping up week 9 of #JustCode with a web app that demonstrates a web service, JSON and SQLite. The web app functions as both an app with a UI and a web service. It lets you enter your own quotes which are saved in a SQLite database. The web service randomly fetches a quote and returns it as JSON.

Comments closed

#JustCode Challenge Week 8 – JumpStart App Launcher

A long, long time ago (1989) one of the first apps I ever made was an app launcher for the Atari ST. I called it JumpSTART. I originally wrote it in GFA BASIC and then later re-implemented it in Pascal (OSS Personal Pascal, technically).

When I got my first modem I went online with Genie and Delphi and uploaded JumpSTART as freeware. Even though it was freeware, I got a few checks in the mail from people that liked it.

I was reminded of JumpSTART when I saw my dock getting crowed. I thought replicating JumpSTART in Xojo would be a good project for week 8 of #JustCode. Though let’s just call it JumpStart this time around.

Comments closed

#JustCode Challenge Week 7 – Pitch Tracker

As many know, I’m a big baseball fan. I was recently at Sea Dogs game (our local AA minor league team) and was sitting behind home plate alongside many scouts who were carefully watching the pitchers. I noticed several were tracking pitch counts using an app on a tablet or laptop. I thought that would make for an interesting app to make in Xojo, so this week I’ve made an iOS app (I’m on an iOS roll it seems) to track the location of pitches, similar to what I observed the scouts using.

The app shows a grid of the strike zone and you tap where the pitch was. You can use the buttons on the bottom to mark the pitch as a ball, strike or in play changing its color. Click the Reset button to clear the pitches for the next batter.

Comments closed

Tutorial: Active Words

Follow this tutorial to learn how to create active (clickable) words in a text of a TextArea control using the OOP Delegate design pattern, which allows you to dynamically change how your app will react when the user clicks on any of these active words. Best of all, this is cross-platform, so you can use it for macOS, Windows and Linux deployments!

Comments closed

#JustCode Challenge Week 6 – Bubble Popper

For this week’s app, I created a simple iOS app where you tap on “bubbles” to pop them. This was actually suggested to me by Dana Brown some time ago as something that would make a great diversion for her son. I have found it helpful with some of my younger nieces and nephews.

This iOS app demonstrates the use of a Canvas and the detection of taps. When all the bubbles have been popped, more are added. It never ends!

Comments closed

GTK3 Can Be a Pain in the Themes

Starting with Xojo 2017r2, Linux apps use GTK3. Since Xojo uses native controls that means your app’s controls will use the theme of the Linux distribution the app runs on. This can sometimes mean that your app’s UI will not look exactly like what you designed in the Layout Editor because a theme may dramatically change control sizes and padding. This is a problem that can occur with any modern GTK3 app.

If this is a problem for your apps, there are a couple ways you can work around it.

Comments closed

Name Your App

Naming your app may seem like the last step and the easiest part of the process, but it actually should involve some careful thought and consideration. A name needs to set the right tone for your app, should relate to it in some way, and should be searchable, meaning something that can be found easily in search engines. For example, you don’t want to name your app TravelTips – there are thousands of google searches that will come up before your app. You want a name you can own.

When we changed our name from Real Studio to Xojo, we wanted to make sure we could find a name that we could own. Not only was Xojo a pretty wide open space in terms of search, but it also stands for something that describes what Xojo is – X is for Cross-platform and “OJO” is for Object-Oriented.

Comments closed