« FMDiSC February Meeti… | Home | Use Saxon to query de… »

News from the MBS Xojo Plugins Version 26.0

In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 26.0.

Passwords for Excel

Some Excel files can only be opened with a password. To make it possible to work with password-protected Excel files with LibXL, we've added a new method SetPassword in the XLBookMBS class where you can set the password needed to open the file.

As you see, you simply set the password and then later you can call one of the Load methods:

var file as new FolderItem("test.xlsx") Var doc As New XLBookMBS(True) doc.SetPassword "secret" If doc.Load(file) Then MessageBox "Okay" Else MessageBox "Failed to load"+EndOfLine+EndOfLine+doc.ErrorMessage End If

WebView

The DesktopWebView2ControlMBS and WebView2ControlMBS classes have each been given the new LaunchingExternalUriScheme event. The LaunchingExternalUriScheme event is raised when a navigation request is made to a URI scheme that is registered with the OS.

This may help you pass through URLs opening applications on the computer directly without dialog, e.g. ftp:// links.

DynaPDF

In the DynaPDF area, we have a new class called DynaPDFParserContentDrawImageMBS. This is the class for a draw image operator. It belongs to the subclass DynaPDFParserContentMBS, which we already welcomed with several child classes in the last release. To find out which DynaPDF instance such an operator belongs to, the new Parent property has been added. It provides us with the corresponding parent DynaPDFMBS object.

There is also a new shared method Multiply that is assigned to the DynaPDFMatrixMBS class. It can multiply two matrices that exist as DynaPDFMatrixMBS objects and then outputs the result as a DynaPDFMatrixMBS object.

Scintilla

There is also news in the Scintilla area. We updated the Scintilla control to the current upstream library, which gives us greater compatibility with macOS Tahoe and a whole lot of additional features. We have new methods and properties for the DesktopScintillaControlMBS and ScintillaControlMBS classes.

For example, you can now use ScrollVertical to determine the scroll position. To do this, simply specify the docLine and subLine in the parameters. This method is a good way for applications to restore the user's positional context when re-selecting a document as it is robust to changes in window width and styles. With the CutAllowLine method, you can cut the current text selection and put the text on the clipboard. If the selection is empty, the current line is cut. Or you can use ChangeSelectionMode to change the selection mode. Here you can choose between stream, rectangular, thin rectangular, or by lines. We have also added new properties, so you can use UndoActions to display the number of undo actions, or use UndoCurrent to query or set the current undo value. Or if you want to change the history or prevent this, you can turn this feature on and off in ChangeHistory. Or would you like to change the CopySeparator between individual multiple selections? Then CopySeparator is of interest to you, because here you can specify a separator that should fulfill this function. These and many other new features await you in these two classes.

When a style is made invisible with the Visible property, text is difficult to edit because the cursor can be on either side of the invisible text segment. With the InvisibleRepresentation property from the ScintillaStyleMBS class, invisible text segments can be made visible with a single UTF8 character, giving the user an indication of whether the cursor is to the left or right of the invisible text. Specify the desired character in this property. The same class now also includes the Stretch property. Here you can decide how large the stretch should be for condensed or expanded text. You can specify a number between 1 and 9, with 1 being very condensed, 5 normal, and 9 very expanded.

New functionalities for Mac

The MBS Xojo Plugins in version 26.0 offers some more new features for Mac users:

Translation

First of all Mac users can look forward to the new Translation component. The MBS Xojo Plugins make Apple's framework available for on-device translation on macOS 26 and iOS 26 or later. Machine learning is used for translation. With an older code path, it is also available for macOS 15 and iOS 18. To learn more about this, please take a look at the blog article Translation Framework in Xojo

StoreKit 2

We have added two new methods to the StoreKit2MBS class. The beginRefundRequest method presents the refund request sheet for the transaction in a window. Call this from account settings or a help menu to enable customers to request a refund for an in-app purchase within your app. When you call this, the system displays a refund sheet with the customer's purchase details and a list of reason codes for the customer to choose from.
 Status may be 'success', 'userCancelled' or 'unknown'. With the requestAgeRange method, you can view the age range of a person logged onto the current device. This allows you to control the content that this user sees.

The CADisplayLinkMBS class

The CADisplayLinkMBS class for Mac and iOS apps is also brand new. This class provides you with a timer object that allows your app to synchronize its drawing to the refresh rate of the display. Your app initializes a new display link by providing an Action event to call when the system updates the screen. The event can read the display link's timestamp property to retrieve the time the system displayed the previous frame. For example, an app that displays movies might use timestamp to calculate which video frame to display next. An app that performs its own animations might use timestamp to determine where and how visible objects appear in the upcoming frame.

System Info

In this release, we would also like to introduce a new property from the NSProcessInfoMBS class. The new boolean property isiOSAppOnVision indicates whether the process is an iPhone or iPad app running on visionOS. It returns true on macOS 26.1 or newer.

New properties for Cocoa

We have added new properties of type Boolean for the classes NSMutableURLRequestMBS and NSURLSessionConfigurationMBS. With these properties, you can now specify whether connections are allowed to use the built-in cellular radios with allowsCellularAccess, whether they are allowed to use network interfaces that have been marked as expensive, constrained, or ultra-constrained with allowsExpensiveNetworkAccess, allowsConstrainedNetworkAccess, and allowsUltraConstrainedNetworkAccess.

We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins version 26.0. If you have any Ideas for new cool features, need a license or have any questions, please contact us.

27 01 26 - 07:49