Jump to content

Recommended Posts

In this article I want to introduce you the new functions from the MBS FileMaker Plugin in version 11.0.

Drag & Drop

Let's start with the functions that are new in the DragDrop component. You can now create a drag drop area over the whole working window. The DragDrop.AttachToWindow function disables FileMaker's drop handler and installs the plugin one to the window.

You can also drag things out of a drop zone. To do this, you can use DragDrop.SetFilePathsToDrag to specify a list of paths to where the files should be taken. With DragDrop.SetDragImage you can set an image that should be displayed when this object is dragged. If we do not set an image, we have a preview image of the dragged file on macOS. 

List Dialog - Filter

We have four new functions for the ListDialog component in connection with filters. A list dialog can have a lot of entries and there it can be very useful if you can limit the entries a little bit before. On the one hand you can set a filter via script. To do this, use the ListDialog.SetFilter function and specify the filter in the parameters. 

Set Variable [ $r ; Value: MBS("ListDialog.SetFilter"; "th") ] 

On the other hand you can show a bar in the list dialog itself where you can change the filter while the dialog is open. 


To show and hide this bar, use the ListDialog.SetShowsFilter function.

Set Variable [ $r ; Value: MBS("ListDialog.SetShowsFilter"; 1) ] 

The other two functions give us the current filter ("ListDialog.GetFilter") or tell us whether the filter bar in the list dialog is shown or hidden (ListDialog.GetShowsFilter). 


In this plugin release there are new features from the DynaPDF component. So you now have a whole new possibility to specify colors with the LAB color space. This color space describes all perceptible colors. L describes the brightness value, whereas a and b define the color itself. The a-coordinate defines the chromaticity and color intensity between green and red and the b-coordinate the chromaticity and color intensity between blue and yellow. The larger positive a and b values and the smaller negative a and b values, the more intense is the tone of color. L can have values between 0 and 100 and a and b have values between -128 and 127. The new MBS function DynaPDF.Lab processes these values to a big number which can be used in different functions. So also in the DynaPDF.SetStrokeColorValue and DynaPDF.SetFillColorValue function. With these two functions you can specify the current stroke color or the fill color. You can use this for example to draw rectangles in your PDF environment. 

Set Variable [ $r ; Value: MBS( "DynaPDF.SetStrokeColorValue"; $PDF; 255 ) ] 
Set Variable [ $r ; Value: MBS( "DynaPDF.Rectangle"; $pdf; 0; 0; 200; 100; "stroke" ) ] 

Set Variable [ $r ; Value: MBS( "DynaPDF.SetFillColorValue"; $PDF; MBS( "DynaPDF.Lab"; 50; -34; 77 )) ] 
Set Variable [ $r ; Value: MBS( "DynaPDF.Rectangle"; $pdf; 0; 0; 200; 100; "fill" ) ] 


What you can do now with DynaPDF is to sign and save PDF files in one step with your key using the MBS FileMaker Plugin itself. For this we have for you the DynaPDF.SaveAndSignFileExt function. In the parameters, as with almost all DynaPDF functions, we first specify the PDF working environment on which we want to work. Then follows the PKCS12 reference of a path or container. You get this reference e.g. by the functions PKCS12.ReadFromContainer and PKCS12.ReadFromFile. Additionally we can use the optional parameters: Reason, Location and Signer. Also we can set in the parameters the FileName and whether the file has a JPEG preview. The function works in the same way as DynaPDF.SaveAndSignFile, but the signing is done by MBS FileMaker Plugin itself instead of DynaPDF. You pass the PKCS#12 key and certificate by reference number. In this way we can support more keys than DynaPDF directly, e.g. with 2048 or 4096 bits.

With the new function DynaPDF.SetPageBreakExpression you can write a page break expression that determines what happens if the page can no longer accommodate the text that is being written and overflows. The overflow is registered at the functions DynaPDF.WriteFText, DynaPDF.WriteFTextEx, DynaPDF.WriteStyledText and DynaPDF.WriteStyledTextEx. If a page overflow occurs here, you can, for example, formulate an expression, so that a new page is added to the PDF document, that writing can continue on this page.

Here you can see an example for a page break expression: 
Set Variable [ $r ; Value: MBS("DynaPDF.SetPageBreakExpression"; $pdf; "Let ( [

$CurrentColumn = $CurrentColumn + 1;

t = If ( $CurrentColumn < $ColumnCount ; 

    Let ( [ 
        $PosX = $StartPosX + $CurrentColumn * ($ColumnWidth + $Distance) ]; 
    0) ; 

    Let ( [ 
        $PosX = $StartPosX; 
        $CurrentColumn = 0; 
        a = MBS( \"DynaPDF.EndPage\"; $pdf); 
        a = MBS( \"DynaPDF.AppendPage\"; $pdf)]; 

a = MBS( \"DynaPDF.SetTextRect\"; $pdf; $PosX; $PosY; $ColumnWidth; $ColumnHeight )
]; 0 )") ] 


There are also new features for Mac and the iOS SDK

iOS App runs on Mac

A very interesting function for users of the iOS SDK and Mac is the new "SystemInfo.IsiOSAppOnMac" function. With this function we indicates whether the process is an iPhone or iPad app running on a Mac. If our app made with FileMaker iOS SDK runs on an Apple Silicon Mac, this function returns 1. Otherwise it returns zero.


With the MBS FileMaker Plugin you can also control the print dialog on Mac. We have now added another option for the print dialog. From now you can use the PrintDialog.SetReverseOrder function to reverse the printing order if your printer has this possibility. In addition to this function we have also added the option in PrintDialog.SetOption with "reverse". 

Set Variable [ $r ; Value: MBS("PrintDialog.SetReverseOrder"; 1) ]
Set Variable [ $r ; Value: MBS( "PrintDialog.SetOption"; "OutputOrder"; "reverse"; "text") ]

Speech Attributes ForVoices

Also for the component Speech, with which your Mac and iOS SDK solutions can talk to the user gets a new feature. With the Speech.AttributesForVoices function you can now get further details about the individual speeches as JSON. There you will find e.g. the information for which region this speaker is well suitable. Here you can see a part of the example output for the speaker voice Alva: 

MBS( "Speech.AttributesForVoices"; "com.apple.speech.synthesis.voice.alva")

Example result: 
"VoiceName" : "Alva",
"VoiceGroup" : "VoiceGroupCompact",
"VoiceLocaleIdentifier" : "sv_SE",
"VoiceShowInFullListOnly" : false,
"VoiceDemoText" : "Hej, jag heter Alva. Jag är en svensk röst.",
"VoiceSupportedCharacters" : [
"UnicodeCharEnd" : 77,
"UnicodeCharBegin" : 33

"UnicodeCharEnd" : 8482,
"UnicodeCharBegin" : 8482
"VoiceLocalizedNames" : {
"he" : "אלווה",
"uk" : "Альва"
"VoiceGender" : "VoiceGenderFemale",
"VoiceNumericID" : 587208531,
"VoiceAge" : "35",
"VoiceIndividuallySpokenCharacters" : [
"UnicodeCharEnd" : 77,
"UnicodeCharBegin" : 33

"VoiceIdentifier" : "com.apple.speech.synthesis.voice.alva",
"VoiceNameRoot" : "Alva",
"VoiceSynthesizerNumericID" : 1886745202,
"VoiceVersion" : "7.0.4",
"VoiceRelativeDesirability" : 3800,
"VoiceLanguage" : "sv-SE"


With the functions from the Window component you can change the properties and settings of windows under Mac OS via script. In this section we have some new functions for you this time. You can now set the mode for the toolbar (Window.SetToolbarDisplayMode). The default for FileMaker is "IconAndLabel", but you can also display only Label or only Icon.


With the function Window.SetTitlebarSeparatorStyle you can set the separator between the titlebar and the other content. You can choose if there should be a separator and if it is a stroke or a shadow. With the function Window.SetToolbarStyle we can set the toolbar style. You can decide where and how the toolbar is displayed. For the last two functions you need Mac OS 11. Of course there is also a fitting Get function for the Set functions to query the current setting. 

We hope you will also find some interesting new features. We wish you a lot of fun with MBS FileMaker Plugin Version 11.0. If you need a license or have any questions, please contact us. 

by Stefanie Juchmes

Link to post
Share on other sites
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.