Skip to content

Category: Learning

Tip: SQLite in RAM … to improve speed!

It’s very usual to use encrypted SQLite databases in our Xojo projects where we expect to get the maximum read speed from them. But the truth is that encrypting the data in these databases can introduce a penalty in our queries, both from read and writing/updating data to them. How can we improve this? One technique is the creation of a new in-memory based SQLite database, where we will be able to copy the table (or tables) we are interested in getting the maximum speed possible with. Continue reading to see how to do this.

Comments closed

Recursion: Emptying a Folder

Do you need code to delete the files and folders from the selected folder? In that case, there is a technique I propose to you and that is based on recursion. That is, the ability of a function to call itself repeatedly until the task is complete; in this case, the function will call itself every time it detects a new folder/directory inside the designated original folder/directory.

Comments closed

Web: Create Sliding-Animated Menus

Sometime ago a Xojo user asked if it is possible to use Xojo Web to create the kind of animated menus seen in several regular websites. After some investigation (and the invaluable help of Greg O’Lone), the answer is: yes, you can do that! If you are interested in seeing how to achieve this, continue reading!

Comments closed

#If vs. If and Conditional Compilation

There was a curious question on the forums about what # meant.

And from the way it was asked I could see the asker was thinking “I know what If means but what about that # in front of it?” And that if they knew what the # meant that the entire thing would make more sense.

And that’s a fair thought – except for one problem. The # by itself doesn’t “mean” anything. It isn’t like *, ^, + or – in that sense. It’s not an operator.

Comments closed

Some Follow-Up Regarding ByRef

A reader asked me to clarify something about my previous post. Their question was:

When MyMethod is written as:

Sub MyMethod( i() as integer )
  i = array(10,20,30)
  system.debuglog CurrentMethodName + " i(0) = " + str(i(0)) + " i(1) = " + str(i(1)) + " i(2) = " + str(i(2))
End Sub

What happens if instead of trying to assign a new array you just alter the values in the array passed in?

Comments closed

Loading 3rd Party Frameworks in Xojo iOS

Did you know that it’s possible to load and use 3rd Party Frameworks in your Xojo iOS projects? There’s quite a number of good projects out there, many of which are on sites like GitHub and freely available for use in your projects. If you’re familiar with Declares in iOS, loading a 3rd Party framework requires just a couple of extra lines of code and a CopyFilesStep.

Last year at XDC 2018, Jérémie Leroy talked about making sure your screenshots mimicked the Apple method so that the date was always Jun 9th, the time was always 9:41 AM, the battery always shows as full and the WiFi strength always shows full. It got me thinking that it might be handy to be able to make the simulator always show those values when you do a debug run so that you don’t need to think about it when you are ready to start taking screenshots and movies of your app. One way to do that is to build & run project like SimulatorStatusMagic on the simulator before running your project, but it would be more useful if it was automatic.

Comments closed

The Two-Finger Tap: Undo Gesture for iOS Apps

The only built-in gesture for undo on iOS at the moment is to shake the device. This is not very intuitive to me and I’ve certainly done it by accident many times. The makers of Procreate chose a two-finger tap and have found that their users adapted to it nicely. This gesture is being adopted by more and more iOS developers. Here’s all the code you need to implement the two-finger tap for undo in your Xojo iOS apps.

Comments closed

3 Things Developers Need To Release Their App Right

So you’ve created an app that you plan to sell, now you’re done, right? Nope, not even close! Developing your app is just step one. Marketing and promoting your app is the key to its commercial success, starting with announcing it. We talked to one successful Xojo developer who has several apps in the App Store. He told us that he spends 50% of his time on development and 50% of his time on marketing. Marketing. You think it’s just something for the Pros or people with a big offering, but it’s not.

Making sure everyone knows about your new app or latest update is really important. I have been in PR/Marketing for many years and have seen it all! The biggest mistake I see is developers forgetting to put a link back to their website or sitelet when talking about their app. In announcements and on social media it’s so important to make sure people can find you easily! Here are the 3 most essential steps you should take when announcing your app (or release) to the world.

Comments closed

Animating the Web: Fading Images in-out

This tutorial will show you how easy it is to create animations on components of Xojo web apps, thanks to the use of the Style Editor and the WebAnimator class. Learn how to do a fade effect between two images that you can expand and adapt to your web apps.

In order to recreate this fade effect we’ll mainly use a couple of styles (WebStyle class) to set the initial status for each one of our images (instances from the WebImageView class). These will be overlaped in the web page, sharing the same position. Then we’ll add a button to the web page so it will fire the animation every time it is clicked.

Comments closed