In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 25.0.
Saxon
A completely new area that we plan to further expand in the next releases is the connection to the Saxon library. Saxon is a widely used and high-performance software library that specializes in the processing and transformation of XML and XSLT data. It enables developers to manipulate data efficiently and convert it into the desired formats. We would now like to make these functionalities from the library available to you in Xojo. We have already included some functionalities in this release, but there will certainly be more to come in the near future. To find out what the MBS Xojo XML Plugin can already do, please have a look at the blog article Saxon in MBS Xojo XML Plugin
Phidget
The Phidgets topic is also growing again. In total, we have added over 60 new features to the Phidget topic in this release. Most of them are properties designed to make your life easier. A lot of them revolve around the motors of the Phidgets. The new class PhidgetMotorVelocityControllerMBS controls the velocity and acceleration of the attached motor. It also contains various other control and monitoring functionalities that aid in the control of the motor. The ExpectedPositionChanged event from the PhidgetMotorPositionControllerMBS class fires when the expected position has changed. This and the PhidgetBLDCMotorMBS and PhidgetDCMotorMBS classes have been given many identical properties. For example, you can use MinSurgeCurrentLimit to get the minimum value that SurgeCurrentLimit can be set to.
In the PhidgetHubMBS class we have two new methods: PortMaxSpeed with which we can determine the max communication speed of a high-speed capable VINT port by specifying the port. We can also use the setPortAutoSetSpeed method to activate or deactivate Auto Set Speed on the hub port. We also have two properties for this class. In PortMode we can determine and set the mode of the selected port. The property PortPower gets and sets the VINT Hub Port power state.
The class PhidgetSpatialMBS that gathers data from the acceleromter, gyroscope and magnetometer on a Phidget board, has also got 8 new methods so we can e.g. determine the minimum acceleration, minimum angular rate and minimum magnetic field strength, the sensor will measure. This and much more awaits you in the MBS Xojo Phidgets Plugin.
DynaPDF
There are also a few new features in the DynaPDF area. On the one hand, we have the GetLastTextPosXAbs and GetLastTextPosYAbs methods from the DynaPDFMBS class. These methods provide us with the X and Y coordinates of the last printed text. This is the absolute position after the coordinate transformation. If you want to determine the relative position, use the GetLastTextPosX and GetLastTextPosY methods.
With the new method CheckEmbeddedFileCheckSum you can now check the checksum for an embedded file. We get a 1 as return if the checksum is correct and a 0 if it is invalid. If there is no checksum, we get a -1 as the return value.
Next, I would like to introduce you to the ConvToFreeTextCallout method. This method converts a regular FreeText annotation to a FreeTextCallout annotation. Finally, I would like to introduce you to the GetFontSize method. With this method we can querie the font size of the active font. The method returns the font size, as a double, greater zero value on success, or a negative error code on failure.
XL
Our XL area, which provides functionalities for working with Excel, has also been updated. We now use the CoreProperties method from the XLBookMBS class to query CoreProperties. As a return we receive an object of the new class XLCorePropertiesMBS. We can read and set various properties in this class. We have the following properties available for this purpose: Categories, Comments, Created, CreatedAsDouble, Creator, LastModifiedBy, Modified, ModifiedAsDouble, Subject, Tags and Title.
With the method RemoveAllPhonetics from the class XLBookMBS we can remove all phonetics data (furigana) from a workbook.
Furthermore we have the two new methods ColFormat and RowFormat from the XLSheetMBS class. You can use these methods to determine Row and Column Format. The methods then return an object of the type XLFormatMBS.
Debugging
We also want to help you with troubleshooting in your programs. You can use our CallDelegateCrashSafeMBS module for this purpose.We have described how this can be useful for you in the article Stacktraces for Windows. In this context, I would also like to mention our new method PrintBacktraceMBS. This can print the stack trace for you.
CURL
This time too, we have a new method in each of the classes CURLMBS, CURLNMBS and CURLSMBS. With the method GetInfoEarlyDataSent we get the number of bytes sent as TLS early data. The result is an integer value. If this amount is negative, the sent data was rejected by the server. TLS allows a server that announces support for early data to reject any attempt to use it at its own discretion. When for example 127 bytes had been sent, but were rejected, it reports -127 as the amount “sent”.
Shell
Today I would like to introduce you to our new property MergeErrorAndOutput in the ShellMBS class. With this property, we can set a Boolean value and query whether one or two pipes should be used for output and error.
Barcode
When working with barcodes, we have various libraries that you can use to generate and recognize barcodes. Zxing is one of these libraries. If you want to query which version of the zxing library you are currently working with, then use our new property version from the ZxingBarcodeMBS class. If you would like to query one of the other library versions, take a look at the LibVersion property in the BarcodeGeneratorMBS class for the zint library and the shared property from the ZBarMBS class for zBar.
New functionalities for Mac
The MBS Xojo Plugins in version 25.0 offers some more new features for Mac users
AVFoundation
We have added two new classes to the AVFoundation section in this release. An instance of the class AVPlaybackSpeedMBS represents a user-selectable playback speed in a playback user interface.
The class AVPlayerViewControllerMBS represents a view controller that displays content from a player and presents a native user interface to control playback. A player view controller makes it simple to add media playback capabilities to your app that match the styling and features of the native system players. Using this object also means that your app automatically adopts the new features and styling of future operating system releases.
In addition, the AVPlayerItemMBS class has a new property called nowPlayingInfo. This holds a dictonary in which the current now playing information for the player item is stored.
MediaPlayer
We have two new classes in the MediaPlayer area. An object of the MPMediaItemArtworkMBS class represents a graphical image, such as music album cover art, associated with a media item. The image is transferred in the constructor.
Another new class is the MPNowPlayingInfoCenterMBS class. An object of this classe is for setting the Now Playing information for media that your app plays. If your app also provides Now Playing information containing information about the current track, use this object to update that information at appropriate times. This object contains a nowPlayingInfo dictionary describing the playing item.
Apple Image Playground
The new macOS 15.2 introduced the Image Playground, which allows us to create images with the help of an AI and also integrate existing images into this process. We have now also made this Apple Image Playground available for Xojo. If you would like to find out more, please take a look at our blog article Use Image Playground in Xojo.
Apple Intelligence with writing tools items
Last year Apple Intelligence embedded features into the new operating system. As developers, we may want to be able to control which of these should or should not be used. We have added a few new features to the plugin that make it possible to manage the writing tools items. We show you exactly what is possible in our blog article Using writing tools in Xojo for Apple Intelligence
Core Text
In the CoreTextMBS class, we have a new method RequestFonts that resolves font descriptors specified on the input. On iOS, fonts registered by font provider apps in the CTFontManagerScope.persistent scope aren’t automatically available to other apps. Other apps must call this method to make the fonts available for font descriptor matching. We also have a new event RequestFontsCompleted that fires after the request operation completes. This event takes an unresolvedFontDescriptors parameter that contains an array of descriptors that couldn’t be resolved or found. The array can be empty if all descriptors resolved.
The Menu
In the MBS Xojo Plugins 25.0, we add a way for a better use of our NSMenuMBS and NSMenuItemMBS class with Xojo MenuItems class. You can find out what advantages this brings you in the blog article Intercept Menus with MBS Xojo Plugins
New functionalities for Windows
Last but not least we offer new features for Windows users
Bluetooth
Under Windows, we have two new classes in relation to Bluetooth. On the one hand, we have the new WindowsDeviceInformationCustomPairingMBS class that represents a custom pairing for a DeviceInformation object. The other new class is the WindowsDevicePairingRequestedEventArgsMBS class that provides data for the PairingRequested event. In addition, we also have a new method in this area in the WindowsDeviceInformationMBS class with the name Close which closes an object for us. The same class also has a Device property that references the device.
WebView 2
The DesktopWebView2ControlMBS and WebView2ControlMBS classes have each received a new BasicAuthenticationRequested event. This event is raised when WebView encounters a Basic HTTP Authentication request. The host can provide a response with credentials for the authentication or cancel the request. If the host sets the Cancel property to false but does not provide either UserName or Password properties on the Response property, then WebView2 will show the default authentication challenge dialog prompt to the user.
Sub BasicAuthenticationRequested(URL as string, Challenge as String,
byref UserName as String, byref Password as String,
byref Cancel as boolean) Handles BasicAuthenticationRequested
System.DebugLog CurrentMethodName
System.DebugLog "URL: "+url
System.DebugLog "Challenge: "+Challenge
UserName = "xxx"
Password = "yyy"
// or
// Cancel = True
End Sub
We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins version 25.0. If you have any Ideas for new cool features, need a license or have any questions, please contact us.