News from the MBS Xojo Plugins Version 21.2
Let’s start with RabbitMQ. We add a new RabbitMQ plugin part to wrap the open source RabbitMQ C library and bring the functionality to Xojo.
RabbitMQ itself is an open-source project implementing a message-broker software. It's a server software to do message queues and then there are various clients available to use the services.
We got a couple of classes for you:
There have also been some changes in the ChartDirector section. You can now use two new types of charts. The discrete heat map and Tree map charts. For that we have the new classes: CDDiscreteHeatMapLayerMBS, CDTreeMapChartMBS and CDTreeMapNodeMBS.
Furthermore we have the new CDDataAcceleratorMBS class. It is for speeding up processing of huge data series. With the DataAccelerator, it is possible to plot a chart with 1 billion data points with programmable track cursor support. The chart can smoothly zoom out to display all data points and zoom in 100,000,000X to see individual data points. At the same time, the chart can update in real time with thousands of data points per second.
We have also the new class CDMultiPagePDFMBS. It is a utility class used to create PDF documents with multiple pages. MultiPagePDF works by generating a PDF page for CDBaseChartMBS or CDDrawAreaMBS. The CDBaseChartMBS can be a CDMultiChartMBS, and can contain free form CDML text, tables, shape and images. In this way, CDMultiPagePDFMBS can create complete PDF reports.
More over we have the new class CDViewPortControlBaseMBS. A viewport control is a user interface element to let the user visualize and manipulate the viewport managed by the CDViewPortManagerMBS. In typical usage, the viewport control displays an "overall chart" that shows the full data range, and connects to the CDViewPortManagerMBS using ViewPortControlBase.setViewPortManager. It can then include a rectangle on the overall chart to represent the viewport in the CDViewPortManagerMBS. The region outside the rectangle can be dimmed out to highlight the viewport region. If the viewport is updated (such as if the user uses the mouse wheel to zoom in the chart), the rectangle will also update automatically.
We got support in SQLite for ICU libraries. Normally we load them when SQLite is initialize and we then add the ICU extension if we find the library. But with the LoadICU method from the InternalSQLiteLibraryMBS class we can explicit load them now. If we want to know whether the ICU libraries were loaded we can query the status with the ICULoaded property. If we want to know if the ICU libraries are used, we can read the ICUUsed property. Furthermore, we can read from the property ICUEnabled whether ICU libraries are enabled.
There is also news from the CURL topics e.g. for CURLSMBS class. We can now query the referrer text. We also added properties to the CURL classes. In the OptionDOHSSLVerifyHost property we specify whether to verify the host name in the DOH (DNS-over-HTTPS) SSL certificate. The OptionDOHSSLVerifyPeer property specifies whether to verify the DOH SSL certificate. The last new property is OptionDOHSSLVerifyStatus and specifies whether to verify the DOH SSL certificate's status.
In the last plugin version we introduced the new component Duck BD which allows to work with Duck DB engine. In this version we add the BindBlob method from the DuckPreparedStatementMBS class. This method binds a value to a BLOB field. The value can be a MemoryBlock or a string.
The new DynaPDF.ChangeFontEx method from the DynaPDFMBS class can change the font size of a font that has been previously defined. The methods SetFont(), SetFontEx(), SetCIDFont(), or LoadFont() return a font handler when they are called. We can then set one of the handlers in the parameters of the new ChangeFontEx method. We can specify the font size and style that we want to use for the next text lines. The font remains the same but the size change. The style flags should be the same as in the initial SetFont() call with exception of the flags fsUnderline or fsStriked which can be used to underline or strikeout text.
We have a new method CopyCellValue from the XLSheetMBS class. That copies the value of a cell to another cell. It does not matter if the source cell is in a different sheet than the target cell, because you can freely select the destination sheet in the parameters. This distinguishes the method from the CopyCell method. In the parameters we specify the destination sheet, source and destination row and column of the cells.
New functionalities for Mac and iOS users
The MBS Xojo Plugins in version 21.2 offers some more new features for Mac and iOS users. A general one is that we now include Apple Silicon support for iOS Simulator.
For our AVFoundation Plugin we added AVCaptureMetadataOutputMBS class, which allows you to scan barcodes with the camera on an iOS device. Since we are working with metadata here, we have also added some properties and new methods to the AVMetadataObjectMBS class.
We have also a new method for the CIImageMBS class. The scaleTo method scales picture to target size. In the parameters we can set the width and hide of the target picture. The Image from the object is the scaled and comes back as object of the same class.
Apple's CloudKit allows us to use a cloud database in Mac applications. Records are the fundamental objects that we use to manage data in CloudKit. For that you have the CKRecordMBS class. With the new method Unarchive you archive the data of to a new CKRecord via NSKeyedUnarchiver. In turn we have the archive method to archives the content of the record via NSKeyedArchiver. With the new method encodeWithCoder we encode a record with a coder that is specified in the parameters. Moreover we have the new method encodeSystemFieldsWithCoder that encodes the record’s system fields. You can use this method to encode the record’s metadata that CloudKit provides. Every record has keys that the system defines that correspond to record metadata, such as the record ID, record type, creation date, and so on. This method encodes those keys in the archive we define in the parameters.
For the CKServerChangeTokenMBS class we have also the two methods Unarchive and Archive to unarchive and archive the tokens.
We also have new methods to work with Cocoa toolbars. The methods come from the NSToolbarItemMBS class. Each item in an NSToolbar is an instance of this class. With the NSToolbarCloudSharingItemIdentifier method we get standard toolbar item identifier for cloud sharing via NSSharingServiceNameCloudSharing. It validates itself and modifies its appearance by using the NSCloudSharingValidation protocol. It sends performCloudSharing to the firstResponder. The NSToolbarToggleSidebarItemIdentifier method sends toggleSidebar to the firstResponder.
Additionally, we have new properies for this class. If the property Bordered is set on an item without a custom view, the button produced will have a bordered style. With the property Title you set the titel of the toolbar item. The new property Navigational defines whether or not the item behaves as a navigation item in the toolbar. For example i.e. back and forward.
The property allowsExtensionItems indicates as a boolean value whether the toolbar can add items for Action extensions. If it is true the toolbar can dynamically create toolbar items for Action extensions in the toolbar configuration panel. The centeredItemIdentifier property position the item in the absolute center of the Toolbar relative to the window, assuming the space allows it. When the window shrinks, the highest priority is to have the most items visible. Thus, centering is broken first. It’ll be pushed off to the left or right as it is necessary.
There are also further innovations in the class NSSharingServiceMBS. This class is for displaying a sharing sheet to allow the user to pre-visualize what will be shared to the service. From the new method attachmentFileURLs you got an array of the file URLs of the files that were shared. Two other new methods deal with the recipients of the shared files. On the one side we can set the list of recipients with the setRecipients function. We can then read them out again with the second method recipients.
We also have a few new properties which we can use to further query and set information. With the property menuItemTitle we can set and get the title of the service in the share menu. The property subject lets us set the subject of email or text message. With the property accountName we get the information account name that is used for sendings on Twitter or Sina Weibo. In the properties messageBody and permanentLink we can see message body as string and the URL to access the post on Facebook, Twitter, Sina Weibo, etc.
New functionalities for Windows users
Last but not least I want to introduce the new functionalities for Windows users.
On Mac, spell checking has been possible for several years. Now we have found a way to offer spell checking for windows as well. With an object of the class WinSpellCheckerMBS we can create a helper that scans the text for errors with the method Check that got the text. The errors are then returned as WinSpellingErrorMBS objects and can be evaluated via the properties of the objects. Below you can see a short example.
Dim w As New WinSpellCheckerMBS("en-US")
Dim Text As String = "Helo World"
Dim errors() As WinSpellingErrorMBS = w.Check(Text)
Dim Error As WinSpellingErrorMBS = errors(0)
MsgBox "Spelling error in """ + text.Mid(error.StartIndex+1, error.Length)+“"""
For the class RemoteControlMBS we got also a new method: WinMouseClick
This method executes a click on a specified position with a mouse button. Some of you may be familiar with this method, because you have already used it in your solutions, but the two older methods are deplicated. Therefore we have now a new updated method for you. In the parameters we first specify the X and Y coordinates of the point to click on, then we specify whether the specification refers to an absolute point and which mouse button should be pressed. We have the parameters for mouse button 1,2 and three. We can assign the values 1 for pressed, 0 for release and -1 for not pressed to these parameters.
We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins Version 21.2. If you need a license or have any questions, please contact us.
by Stefanie Juchmes