« XDC Developer Retreat… | Home | Combine PDFs 5.6 »

News from the MBS Xojo Plugins Version 22.3

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

MongoDB

The coolest feature in new release is the new Mongo DB plugin. You can now use Xojo to access MongoDB databases, read, write and delete data. The special thing about Mongo DB is that it is not a rational database that is limited by relationships and tables, but is based on a JSON-like structure that also allows unusual queries. For example, you can formulate searches to see who has been in your company longer, the carpet in the warehouse or your employee. In rational databases, your carpet wouldn't normally appear in the same table as your employee. So you would have to design a separate table to be able to make this query. In Mongo DB, the records, here called documents, can coexist in the same collection and a simple query can be made. If you would like to try Mongo DB, please check out our examples.

CURL

In the CURL topic there are two new methods for the classes CURLMBS, CURLNMBS and CURLSMBS. With GetInfoCAInfo we get the default CAInfo value. With GetInfoCAPath we get the default CAPath.

DynaPDF

We also have three new functionalities in the DynaPDFMBS class. You can use the new SetTemplBBox methods to change the dimensions of your bounding box for your template. We have this method twice in the plugin so that you can decide whether you want to specify the new dimensions as a DynaPDFRectMBS object or with individual parameters Left, Top, Right and Bottom.
If you want get or set the size of the currently used font you can now use the FontSize Property to get or set the font size.

Serial Port

With the SerialPortMBS class we provide our own class for serial ports, including those via USB cable. You can list them, connect and then send and read data.

Connect to medical devices, scales and measurement devices.

System Info

Do you want parts of your code to run only on the new macOS 13 Ventura? Then use the isVentura methode from the SystemInformationMBS class to test if it is the latest operating system. The new method WindowsNativeMachine determine the machine type. So that it returns ARM64 on a Windows with ARM CPU. In the other way WindowsProcessMachine method queries the machine type of the current process. So it return AMD64, while running it in an emulation on ARM64.

New functionalities for Mac

The MBS Xojo Plugins in version 22.3 offer some more new features for Mac and iOS users

WebKit 2

We update our WebKit 2 control for our macOS and iOS. If you use decidePolicyForNavigationAction, you have to update the code to use the new WKPolicyForNavigationResponseDecisionHandlerMBS class to pass navigation decision to the plugin instead of returning a boolean. Check the new WKNavigationActionMBS and WKFrameInfoMBS classes for details on the requests. The new WKDownloadMBS class and related events let you track downloads.

Events

We have three new methods for the NSEventMBS class where we receive a new NSEventMBS object for each method. In the parameters of the mouseEvent, keyEvent and otherEvent functions we specify various properties of the special event. For example, we can specify if the event was a mouse click, if the mouse was moved or if the mouse button was pressed, the position of the click, the modifier flags, the time of the click, the window in which the click would be performed, the event number, how often the click was performed and the pressure of the click.

Search Field

The new NSSearchFieldCellMBS class defines the programmatic interface for text fields that are optimized for text-based searches. When the user types and then pauses, the cell’s action message is sent to its target. You can query the cell’s string value for the current text to search for.

AV Player

Also in this release there is a new class in the AVFoundation topic. The AVFondation topic deals with recording and playing audio and video on Mac. In this release we welcome the new AVPlayerLooperMBS class. AVPlayerLooperMBS is a helper object that repeatedly plays an AVPlayerItemMBS with an AVQueuePlayerMBS. The same result can be accomplished with AVQueuePlayer directly, but AVPlayerLooper provides a simpler interface to loop a single AVPlayerItem with an option to specify a time range.

Contact Picker

There is also a new class for the Contacts for iOS, the CNContactPickerViewControllerMBS class. A CNContactPickerViewController allows the user to select one or more contacts (or their properties) from the list of contacts displayed in the contact view controller (CNContactViewController). The picker supports both single selection and multiselection of the contacts. The app using contact picker view does not need access to the user’s contacts and the user will not be prompted for grant permission access. The app has access only to the user’s final selection.

Document Picker

Also new we have the UIDocumentPickerMBS class for iOS it is a view controller that provides access to documents or destinations outside your app's sandbox. Use it to select a document to open or export and optionally copy it.

SceneKit

Music now comes to SceneKit with the SCNAudioPlayerMBS and SCNAudioSourceMBS classes. Build sound and music into your animations. To use Positional Audio, first create a reusable SCNAudioSourceMBS or AVAudioNodeMBS object to provide an audio stream. Then, create an audio player to control the playback of that audio source. Finally, attach the audio player to an SCNNodeMBS object for 3D spatial audio playback based on the position of that node relative to the audioListener node of the scene.

Bluetooth for Windows

Last but not least I want to introduce the new Bluetooth functionalities for Windows users. Already in the last release we added functionality for working with low energy devices in Bluetooth. In this release we add classes for GATT. GATT stands for Generic Attribute Profile. It is optimized for efficient data transfer of small amounts of data.
The new class WindowsGattDeviceServiceMBS describes a GATT primary service on a Bluetooth device. It is instantiated using a device service instance path obtained by searching for a device via the Windows.Devices.Enumeration API. You can then use the new GetGattService method from the WindowsBluetoothLEDeviceMBS class to determine the associated GATT using the service ID.
A WindowsGattCharacteristicMBS object represents a GATT characteristic of a particular service and is obtained via the Characteristics property of the GattDeviceService object.
The new WindowsGattDescriptorMBS class specifies a GATT descriptor of a particular characteristic and is obtained via the Descriptors property of the GattCharacteristic object.
These and some more classes can be found in the new release.

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

The biggest plugin in space...
20 07 22 - 07:37