News from the MBS Xojo Plugins Version 25.2
In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 25.2.
LibXL
Let's start with what's new in the LibXL topic. LibXL supports you since years in creating, reading and modifying Excel files. This release adds the XLTableMBS class which allows you to add and format tables.
First, we can add a table with the AddTable method from the XLSheetMBS class. You can give this table a name, a range, if it has a header and a style. You can change the name and style later using the properties of the class we have added.You can find out which styles you can use here.

With the properties we also can decide whether we want to apply the formatting to the colum and row stripes. With theproperties ShowLastColumn and ShowFirstColumn you can decide whether the first and last column should have the style applied. If you want to know how many columns are in your table, use the ColumnSize property.
Would you like to give a specific area in your table a border? This is no problem with the SetBorder method from the XLSheetMBS class. First define the area in the parameters and then specify the border style and color.
DynaPDF
DynaPDF also has a new feature in this release. With the new class DynaPDFRenderJobMBS you can render PDF pages on a background thread. This saves you time and can make your program more efficient.
We have also recently published an interesting blog article on Bidirectional Mode and Complex Text Rendering in DynaPDF. If you are interested, please have a look at our blog.

Atomic
We have a new Atomic section that supports us with multi threading. For example, we can use the AtomicQueueMBS class to set up a job queue where multiple threads add or remove jobs. This class provides functions to add one or more values to a queue, or even to attach an entire queue to another queue. You can then read and remove the entries from the beginning of the queue or from its end.
Var q As New AtomicQueueMBS q.Push 1 q.Push 2 q.Push 3 q.Push 4 q.Push 5 Var f As Variant = q.PopFirst // 1 Var l As Variant = q.PopLast // 5 Var c As Integer = q.Count // 3 remaining Break
The AtomicIntegerMBS class is also interesting. This is a class for an atomic integer. It have one object as counter or flag to get/set from multiple threads. This class contains methods with which you can subtract or add values from this value. You can increment and decrement it and apply logical operators such as AND OR or XOR to it.
You can also find more information about this in our blog article Introducing AtomicQueueMBS - A Thread-Safe Queue for Xojo
Python
In the Python topic, we also have new properties in the PythonMBS class. These can provide us with a little more information about the library we are using. The property LibraryBuildInfo return information about the sequence number and build date and time of the current Python interpreter instance. To get an indication of the compiler used to build the current Python version we use the property LibraryCompiler. The official copyright string of the current Python version is provided by LibraryCopyright. If you want the identifier of the current platform, then use LibraryPlatform.
We as well have two properties that deal with the time in your programs. With Time you can read out the so-called "wall clock" time. In contrast, MonotonicTime determines the time on the monotonic clock. As the monotonic clock runs independently of the operating system time, it is particularly suitable for determining the duration of processes.
MongoDB
Mongo DB is a versatile non-relational database that offers you many possibilities, but when we come up with very large amounts of data such as video or high-resolution images, MongoDB reaches its limits. For this use case, for example, we have implemented gridfs. The system as a whole consists of gridfs objects that contain gridfs files and gridfs file lists. Feel free to store your files in a MongoDB database. The new classes MongoGridFSMBS, MongoGridFSFileMBS, MongoGridFSFileListMBS, MongoGridFSFileOptionsMBS and MongoStreamMBS will support you.
JavaScript
We have also included something for JavaScript in the new release. There are cases where we run into an endless loop with our JS program or the process simply takes too long. So that we can solve this problem, you can now use the SetExecutionTimeLimit method from the JSContextMBS class. In this method, we can specify the number of seconds after which a JavaScript should be terminated. We also have the new ShouldTerminate event. It will be invoked when the time limit has been reached. This will give you a opportunity to decide if you want to terminate the script or not. If you don't implement the event, the script will be terminated unconditionally when the time limit has been reached.
CURL
This time we also have new methods for the classes CURLMBS, CURLNMBS and CURLSMBS. The method OptionTCPKeepCount sets the number of probes to send before dropping the connection. So it is the maximum number of TCP keep-alive probes. With the method OptionUploadFlags you can set flags in connection with the upload of files. The current supported flags, to send the server relating to uploaded files are:
Answered (1) | which sets the Answered flag for IMAP uploads |
Deleted (2) | which sets the Deleted flag for IMAP uploads |
Draft (4) | which sets the Draft flag for IMAP uploads |
Flagged (8) | which sets the Flagged flag for IMAP uploads |
Seen (16) | which sets the Seen flag for IMAP uploads JSON |
SwissQR Code
The next method from the BarcodeGeneratorMBS class, I will introduce is particularly interesting for our Swiss customers, because with FilterSwissQRCode we have a shared method that filters the allowed characters for the Swiss QR code. If the text contains characters that are not allowed, we try to translate them: e.g ¼ is changed to 1/4.
New functionalities for Mac
The MBS Xojo Plugins in version 25.2 offers some more new features for Mac users
Vision
The Vision component accesses Appel's own AI for image, text and barcode recognition. In this release, we were again able to extend Xojo's access to these functionalities. An instance of the class VNGeneratePersonInstanceMaskRequestMBS produces a mask of individual people it finds in the input image. The class VNGenerateForegroundInstanceMaskRequestMBS enerates an instance mask of noticable objects to separate from the background. Both classes have a method results that will return an array of VNInstanceMaskObservationMBS objects. Here we can, for example, output the individual objects as a mask.
AVPlayer
The AV Player, that displays content from a player and presents a native user interface to control playback, now get a new method. With present from the AVPlayerViewControllerMBS class we can present the view controller fullscreen.
CFBinary
The CFBinaryDataMBS class is a class for core foundation data from Apple. In this release, we would also like to add a few new features to this class. On the one hand, we can now use the constructor not only for stings and memory blocks, but also with pointers. We have also added features for encoding and decoding Base 64. In addition, we can now compress and decompress content. You can select the desired algorithm yourself.
New functionalities for Windows
Also we offer new features for Windows users
WinSparkle
We have the new UpdateDismissed, UpdatePostponed and UpdateSkipped events for the WinSparkleMBS class. The event UpdateDismissed is called when the user closes the update dialog, including when there were no updates or an error occured. UpdatePostponed fires when the user postpones an update by pressing the 'remind me later' button. When a user skips an update, the event UpdateSkipped fires. These events are useful in combination with CheckUpdateWithUI or similar they allow you to perform some action when these cases come into the play. You can also use the SetHTTPHeader method to set custom HTTP headers for appcast checks. With the method ClearHTTPHeaders you can clear them again.
Windows Compressor
We also have a compression class WindowsCompressorMBS for Windows with which you can use the built-in compression libraries of Windows 8 or higher. Here you can compress data with an algorithm of your choice. The data can be transferred as a memory block, pointer or string. We also have the WindowsDecompressorMBS class for decompression.
We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins version 25.2. If you have any Ideas for new cool features, need a license or have any questions, please contact us.
We are also planning a conference for next year, so please join us at the conference and exchange knowledge with participants and our team. You can find more information in our blog article here. See you there!
