I’ve heard it several times: how can I export to PDF from Xojo? Sure, there are lots of answers pointing to a bunch of resources, including excellent plug-ins from third parties. But can you accomplish the same thing using an already available API? Yes, there is a remote API for that! The requirement is that your Xojo app will need to have access to Internet … and, of course, you’ll need to do just a bit of coding.
Many years ago, the Window Functionality Suite (WFS) library was created by Aaron Ballman. This library was a collection of Win32 Declares (and a few other things) for accessing Windows-specific functionality that was not directly provided by the Xojo framework.
WFS is still available on GitHub, but it has languished over the years. For example, it has lots of legacy code in it for older versions of Windows that is no longer needed since Xojo only supports Windows 7 and later. WFS is also not really compatible with 64-bit projects since the Declares mostly assume 32-bit or bust.
To that end, I’ve started a new open-source project called WinAPILib that is now available on GitHub.
If the deprecations and changes to the FileMaker platform have you searching for alternatives, Xojo is a solid place to start. FileMaker developers use Xojo for a variety of reasons, including lower cost, more powerful apps and native iOS apps.
Xojo is a powerful, full-featured development tool and as far as professional development tools go, Xojo is amazingly easy to use. For people with programming experience or those that want to learn, Xojo is a great choice for creating powerful apps to meet any business need – from cross-platform desktop apps, web apps, mobile and iOT apps.
A question on the Xojo Forum got me thinking that it may not be obvious how to avoid having to reach inside another window (or dialog etc.) to access its controls to get and set values. I’m sure we all have done this at one time or another but it really is something you should avoid. Here’s a small app to demo how to make an API instead:
2017’s first “What is Xojo?” webinar was well received and there were lots of questions. Rather than include the questions in the video, I’ve included a…
In this Xojo tutorial we will see how simple it is to make an iOS App that shortens an entered URL using the public API of Bit.ly. We will use our own subclass inherited from Xojo.Net.HTTPSocket, and the Declare statement in order to use some functions and methods found on the native Cocoa Touch API. In fact, the use of Declare is mandatory because with the new Xojo Framewok we don’t yet have access to the EncodeURLComponent function available with the old framework. This one is a big help in substituting any ilegal character with his hexadecimal value for the final URL’s composition.
While Xojo doesn’t currently provide a direct way of recursively deleting a folder, there are various options that will allow you to do this:
1. Recursively iterate through all the folders, deleting each one. You can read about that at our Developer Site, this is the best cross-platform way.
2. Use the Shell to recursively delete a folder (i.e. “del /s” on Windows, or “rm -rf” on OS X and Linux)
Windows specific ways:
3. SHFileOperation (an older API)
4. IFileOperation (the more modern API that Windows recommends over option #3)
I’ve decided to look at option #4, since this allows more customized options, like the ability to show a progress dialog. However, it is also the slightly more complicated option since it deals with COM & Delegates. The example illustrates this:
What is Slackbot?
Slack has an API called “slash commands” that lets a user type a slash (/) followed by a command name in order to perform a special action. For example, Slack has many built-in slash commands, one example is /help. Here’s how you can easily add your own slash commands using a Xojo web app and the HandleSpecialURL (or HandleURL) method.
Your slash command makes an HTTP request to your Xojo web service app. The web services does its thing and then returns the result back to Slack to display.