« Connect to Claris Fil… | Home | Playing with Machine … »

News from the MBS Xojo Plugins Version 20.4


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

The new FileMaker Plugin 

Our plugins welcome a new plugin in their circle, the FMAPI plugin. With this plugin you can use Claris FileMaker Server Data or Admin APIs from Xojo. 

With instances of the FMDataMBS you get a connection to the FileMaker Server. For the login you need user name and password or OAuthRequestId and OAuthIdentifier for oAuth. A connection attempt can look like this: 

Dim d As New FMDataMBS

 

d.Password = "admin"

d.Username = "admin"

d.Server   = "localhost"

d.Database = "test"

 

Dim r As FMResponseMBS = d.Login

 

We can then run searches on this connected database, read, modify, add, duplicate and delete records. We pass queries to the database to the appropriate functions. These are instances of the class FMRequestMBS with various details. On return we get result objects of class FMResponseMBS.


To pass container data to the FileMaker database we need objects of class ContainerUploadMBS with file data and metadata like file name and mime types. For example, you can store an image in a container of the FileMaker database.

It is also possible to start a FileMaker script in Xojo on the FileMaker database. 

 

To connect via the Admin API we use instances of the FMAdminMBS class. The connection setup is very similar to the connection to the server.

 

Dim d As New FMAdminMBS

 

d.Password = "admin"

d.Username = "admin"

d.Server   = "localhost"

 

Dim r As FMResponseMBS = d.Login

 

With a connection to the Admin API we can perform administrative tasks. So we can edit schedules or update the security settings.

 

This plugin offers many interesting possibilities for you in relation to FileMaker servers. 

 

Load libiconv manually 

Some classes like TextConverterMBS use libiconv for text encoding conversion. In most cases this archive is loaded automatically. If you have to load it explicitly manually, you can use the method LoadIconvLibrary in the following classes: ArchiverMBS, TextConverterMBS, XMLValidatorMBS, zxingReaderMBS, GM16ImageMBS and GMImageMBS.

 

CURL 

In the CURL plugin, two methods have been added for classes CURLMBS, CURLNMBS and CURLSMBS to get more information about the connection. You can use the function GetInfoEffectiveURL to get the last used effective URL or use the method GetInfoRetryAfter to get the number of seconds the HTTP server suggests the client should wait until the next request is issued. To the classes have also been added properties. In the property SupportsUnicode you can specify whether unicode for Windows is enabled. The property SupportsZSTD determines whether Supports the HTTP zstd content encoding by using zstd library. Suitably to it with zstdVersion and zstdVersionNumber we get the human readable string version and the version number for the zstd library. 

JSON

We also have a new feature for JSON. The new method ArrayItems from the class JSONMBS returns if we call this method with an object that is a JSON array, a JSON that has the array elements as objects.

 

GraphicsMagick

There are innovations in the classes GMImageMBS and GM16ImageMBS. We have two new methods for these two classes. The first method returns the current user version of GraphicsMagick. The second method queries image as ZPL hex image. This is for sending data to a receipt printer. The picture is taken as black & white image and we build the hex string, you can send to the printer.

 

If we want to use text in GraphicsMagick, the following properties will give us more possibilities to configure this more user specific

 

  • FontFamily
  • FontStretch
  • FontStyle
  • FontWeigh

Keep Alive messages configuration

For SSH connections we can now configure the sending of Keep alive messages in more detail. This possibility is provided by the ConfigureKeepAlive method from the SSH2SessionMBS class. With this method we can configure whether the socket should send keep alive messages regularly. The specification is in seconds.

Dyna PDF 

For DynaPDF Plugin we decided to implement DynaPDFErrorExceptionMBS class. If you don't implement an Error event, we raise exceptions when an error happens. This should help beginners to not miss errors. And as you can load a custom DynaPDF library, we have a DynaPDFMissingFunctionExceptionMBS class to inform you that a function is not available. To make debugging easier, we added ActiveFontInfo property, which you can inspect in debugger to see what the current font is.

New functionalities for Mac users 

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

Image Capture 

We have two new events to offer in the topic of Image Capture. The event cameraDeviceDidEnableAccessRestriction from class ImageCaptureEventsMBS is called when Apple device has been locked, and media is unavailable until the restriction has been removed. The other event, cameraDeviceDidRemoveAccessRestriction, works in the opposite direction and fires, if Apple device has been unlocked, paired to the host, and media is available. These events make it possible for example to show the user a dialog that he should unlock his iPhone before continuing the process or it take a picture when the iPhone is unlocked.

WebKit

There are also some nice new features in the WebKit2 area. In the class WKPreferencesMBS with the property defaultFontSize you can now specify a default font size with which the web content is displayed in your window. You can also specify the font family in the property standardFontFamily. in the same class we can specify in the property loadsImagesAutomatically that images of a webview should be loaded automatically or with the property shouldPrintBackgrounds if the background of a webview should be printed. We can also enable or disable the access to developer tools. We set the respective boolean value in the property developerExtrasEnabled. 

 

In the class WKWebViewMBS you can now set the properties backgroundColor and drawsBackground to set the background color of the Webview 

New functionalities for Windows users 

Last but not least I want to introduce the new functionalities for Windows users. 

Visual Studio 2019

The main feature of the newer plugins version for windows user is our move from Visual Studio 2008 to the more current version 2019. We now use universal runtime library, the same Visual Studio runtime as Xojo. As Windows 10 includes those DLLs by default and Windows 7 and 8 can install them, the plugin should run fine there. We worked on this for over a year to get all our libraries ported and recompiled. All parts come together and now we can ship our Windows plugins built with current tools and start to add more Windows 10 APIs over time.

 

Windows Location 

You can already use one of these new possibilities. For years now we have functionalities for Mac that can query where the machine that use the classes is currently located. Such functionalities are now available for Windows too. For example, you can determine where your Windows tablets are currently located to provide faster and more targeted support. The following classes with their properties and methods are available: WindowsLocationManagerMBS, WindowsLocationMBS and WindowsLocationExceptionMBS. Because the location of a computer is a data security issue, we first have to ask, with the RequestPermissions method from the class WindowsLocationManagerMBS, the user for permission to use this functionality. It opens a system dialog box to request user permission to enable location devices. When the permission is accepted we must call the method StartEvents once to start the location queries. The time between the requests you can set in the property ReportInterval. If you want to stop the events call the method StopEvents. If the position of the device changes, the LocationChanged event fires and returns an object of class WindowsLocationMBS. We can then read the properties of this object. The informations that we can get are: windowslocationmbs-property.shtml">Altitude, Accuracy of the windowslocationmbs-property.shtml">Altitude, Latitude, windowslocationmbs-property.shtml#6">Longitude, Accuracy of the radius, Timestamp, SensorID and the internal object reference.

 

Windows Store 

In the MBS Xojo WinFrameworks Plugin there is a new topic: the Windows Store. With the classes and functions of this template area you can work with in-App purchases in the Windows Store. 

 

The class WindowsStoreContextMBS you can, as a member, use to access and manage Microsoft Store-related data for the current app. For example, you can use members of this class to get Microsoft Store listing and license info for the current app, purchase the current app or products that are offered by the app, or download and install package updates for the app.

 

In connection with this, objects of class WindowsStoreAppLicenseMBS class helps you to find out more about the license of an app, e.g. whether it is in tail mode.

 

Instances of the Klass WindowsStorePriceMBS held informations about the price in the properties. 

 

Products in the Store are organized in a hierarchy of product, SKU, and availability objects. 

Products are represented by WindowsStoreProductMBS objects.

The SKUs for each product are represented by WindowsStoreSKUMBS objects. A SKU is a code that uniquely identifies a particular version of a product or service. It is a very common term used in the field of inventory management.

 

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

 

by Stefanie Juchmes

The biggest plugin in space...
22 09 20 - 10:39