FileMaker DevCon Videos



A few days ago FileMaker posted the videos from the DevCon sessions. If you attended the conference, you can download videos and slides.

Some presenters seem to like our MBS Plugin and you see it in the presentation. e.g. the colors in the scripts.
Did you see which presentations include MBS Plugin?

Also with end of month our DevCon sale ends. Everyone from DevCon got a license?

Toolbar functions for FileMaker on Mac


With plugin version 4.3 we introduce a couple of new toolbar functions. First we can install a background image. The Toolbar.InstallBackground function takes a picture from a container and installs the necessary functions to have a background picture. The plugin can draw the picture behind toolbar buttons, so you can customize your application. If you call again with different picture, you can change it or pass no image and clear it.

Configure Toolbar

The toolbar on Mac can be configured by the user. Normally the user will choose the menu command to customize it. Or you call the plugin function Window.RunToolbarCustomizationPalette and show the palette by script.

The configuration settings are saved as XML text. You can query current configuration of a toolbar in a window using Window.GetToolbarConfiguration and set it later with Window.SetToolbarConfiguration. This allows you to hide certain buttons by using special configuration. As the configuration settings are stored as xml, you can edit them yourself.

Your own toolbar buttons

To enable the plugin to add your own toolbar items, please call once Toolbar.Install function. This will instruct the plugin to install the necessary callbacks to intercept some toolbar functions which are called by the OS to find out what toolbar items FileMaker provides. This way plugin can add your custom identifiers to the list.

Now you can register toolbar items using the function Toolbar.Register. Call it once on startup of solution for each button you may want to introduce. You need to define your own unique identifier string for the toolbar button. Be aware that FileMaker already has a few identifiers defined already like NewRecordToolbarItemIdentifier. OS X also defines identifiers for standard items like NSToolbarFlexibleSpaceItem. With the parameters you define which script is called for this button by specifying a filename, a script name and the script parameter. For the button itself you specify an image (best PNG with mask), which is scaled down to the required sizes. You can specify a label for the toolbar and a second label for use in the customization panel. Of course you can also specify a tooltip as a help text.

Now when you registered your toolbar item, you can use the identifier in the configuration xml. In a script triggered by opening the layout, you can setup the right xml to be used for toolbar and enable the buttons you need. Your toolbar may look like the picture above. (more)

MBS Filemaker Plugin, version 4.3pr7

New in this prerelease of the 4.3 plugins:
  • Changed JSON.GetObjectItemTree to also look into arrays. Please pass index in array as parameter.
  • Added new toolbar functions to add your own toolbar items.
  • Added new functions for Mac to configure the toolbar in a FileMaker window.
  • Added FM.DisableRuntimeEndWindow function.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Second teaser



As you see I have currently a lot of fun working with the FileMaker toolbar.
So for next MBS FileMaker Plugin we have some new functions.

A Teaser

A little teaser to upcoming FileMaker plugin. What happened here?


Code Signing FileMaker Runtimes

Everyone producing runtimes with FileMaker 13 for Mac OS X has a problem. You need to sign the app for Gate Keeper. If your runtime is not signed, the Finder will ask the user when launching the application after download to delete the app! To avoid users get confused or not use the runtime, we sign the runtime.

How?

Signing the runtime got harder with new requirements in Mac OS X 10.9 and the upcoming Yosemite release. We not just need to sign the actual application, but also make sure we sign all the components. For the frameworks inside the runtime, we need to fix them to give them a few standard symlinks which are missing. Without those modifications, the bundle will not sign. Luckily all the PPC code and duplicate libraries got removed in FileMaker 13.0v3, so we don't need to do this yourself like in FileMaker 12. If you like to save a few bytes, you can delete the icon files: FM12Dict.icns, FM12Label.icns and FM12Plug.icns inside the runtime. Those are not referenced and never used.

Developer Account

In order to sign, you need to sign up for a Mac Developer Account with Apple. This costs $99 per year. In the Certificates, Identifiers & Profiles section, please go in Mac Apps section and there in Certificates. Create a new Developer ID, follow the instructions and download the certificate file. Double click it to add it to Keychain Manager and voila, it is installed and ready to use.

Sign Script

The complete script is here for download as zip archive: signscript.zip

When you edit the script in a text editor (like BBEdit or TextWranger), you can change the path to the runtime, the name of the app and the name of the certificate. Please note that this script will not work without correct values. If your file name or path contain special character, escaping may be needed. For example a space character needs to be escaped with putting a backslash character just before the space character. You can learn how to escape a path by dragging and dropping the file or folder into the window of the Terminal application. The path is inserted and you can copy & paste it.

Now when everything is setup for your runtime in the script, you can drop the script on a Terminal window and press return key to start it. You'll see a couple of messages. This may include some complains from rm command trying to delete files which are not there. Nothing to worry about, the script just makes sure everything is correct. Further you see a couple of sign message for various parts of the application. The final line should show "signed bundle with Mach-O thin" and report success for signing your runtime app.

Verification

To check if app is okay for Gate Keeper you can first verify code signature using a call to codesign with a couple of v for more details and -d to display certificate:

codesign -d -vvvv /Users/cs/Desktop/Test/test.app

Next with spctl utility you can show if app is accepted. So we run spctl utility with verbose messages and -a parameter:

spctl -a -vv /Users/cs/Desktop/Test/test.app

Please change path to your runtimes before running above commands. The output should say "accepted" and now you are lucky and can archive and upload your runtime. Good luck!

proudly sponsored by INtex Publishing


PS: Please check MBS Plugins for included scripts for newer FileMaker versions and read the following tech note from Apple:

Technical Note TN2206
macOS Code Signing In Depth

developer.apple.com/library/prerelease/content/technotes/tn2206/

You may need to code sign your disk images when delivering software as well as the software inside.

Compressing PDFs with PDFKit in FileMaker

With QuartzFilters we have the possibility to process PDF files while we create them and apply modifications. Beside color modifications like having only gray, sepia or b&w images in a PDF, we can use a filter to create a PDF file in PDF/X standard format. With a custom image compression filter we can reduce file size of PDFs. Especially those with a lot of images can be reduced by shrinking each image to a smaller JPEG compressed copy.

Creating the Filter

First you show the QuartzFilter Manager panel with executing the plugin command MBS("QuartzFilterManager.ShowPanel"). This will show the panel where you can use plus button to make a new filter. With the new filter named, use the button on the right side to add the Image compression effect from the image effects menu. Than select options, e.g. JPEG with middle quality.

The prebuilt filter "Reduce File Size" also reduces all images to a maximum size of 512 pixel, but that is in our tests often too small. Replacing uncompressed images with JPEG versions reduces the size significantly alone.

Using the Filter

Once the filter is created, it should appear in the list returned by QuartzFilterManager.Filters function. You can now use the plugin function PDFKit.SetCurrentFilter to make this filter the current one. Your next call to PDFKit.Combine, PDFKit.GetPDFPagesPDF or PDFKit.GetPDFPagePDF will use the filter. So the call to PDFKit.Combine passing existing PDF in container can shrink it and you store the PDF in a new container.

Your milage may vary. Some PDFs can be compressed a lot this way, but others are not affected or even bigger! So be careful and compare size before and after and use the smaller one.

Those filters are also available in our Combine PDFs utility and in our MBS Xojo Plugins.

MBS Filemaker Plugin, version 4.3pr6

New in this prerelease of the 4.3 plugins:
  • Changed QTMovie.OpenContainer and other functions to work with interactive containers containing M4V, MP3 and MOV files.
  • Added parameter for CURL functions which set text options. You can pass a text encoding as parameter. Default is UTF-8 as before.
  • Added FileDialog functions to set filters and limit dialog to specific file types.
  • Added PDFKit.SetCurrentFilter and PDFKit.GetCurrentFilter.
  • Added QuartzFilterManager.Filters, QuartzFilterManager.ShowPanel and QuartzFilterManager.HidePanel.
  • Added Files.FileInfo function.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

MBS Filemaker Plugin, version 4.3pr5

New in this prerelease of the 4.3 plugins:
  • Please note that minimum Mac OS X version now is 10.6.
  • Rewrote CPUID detection.
  • Updated DynaPDF to version 3.0.33.97.
  • Made first changes for future Mac OS X version.
  • Fixed bug with DataMatrix encoding in barcode generation.
  • Updated zint library to current version.
  • Updated to OpenSSL 1.0.1i.
  • Reimplemented Icon.GetIcon on Mac to user newer APIs.
  • Fixed Files.FileKind for Windows.
  • Added options for SQL.SetConnectionOption to turn on SSL for MySQL via new options: MYSQL_SSL_KEY, MYSQL_SSL_CERT, MYSQL_SSL_CA, MYSQL_SSL_CAPATH and MYSQL_SSL_CIPHER. If those are set, we pass the strings to mysql_ssl_set function.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

MBS Filemaker Plugin, version 4.3pr4

New in this prerelease of the 4.3 plugins:
  • Updated LCMS2 used for GraphicsMagick to version 2.6.
  • Added Files.ReadJPEG, Files.ReadPDF and Files.ReadPNG.
  • Added Barcode.SetOptions.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Archives

Mar 2024
Feb 2024
Jan 2024
Dec 2023
Nov 2023
Oct 2023
Sep 2023
Aug 2023
Jul 2023
Jun 2023
May 2023
Apr 2023
Mar 2023
Feb 2023
Jan 2023
Dec 2022
Nov 2022
Oct 2022
Sep 2022
Aug 2022
Jul 2022
Jun 2022
May 2022
Apr 2022
Mar 2022
Feb 2022
Jan 2022
Dec 2021
Nov 2021
Oct 2021
Sep 2021
Aug 2021
Jul 2021
Jun 2021
May 2021
Apr 2021
Mar 2021
Feb 2021
Jan 2021
Dec 2020
Nov 2020
Oct 2020
Sep 2020
Aug 2020
Jul 2020
Jun 2020
May 2020
Apr 2020
Mar 2020
Feb 2020
Jan 2020
Dec 2019
Nov 2019
Oct 2019
Sep 2019
Aug 2019
Jul 2019
Jun 2019
May 2019
Apr 2019
Mar 2019
Feb 2019
Jan 2019
Dec 2018
Nov 2018
Oct 2018
Sep 2018
Aug 2018
Jul 2018
Jun 2018
May 2018
Apr 2018
Mar 2018
Feb 2018
Jan 2018
Dec 2017
Nov 2017
Oct 2017
Sep 2017
Aug 2017
Jul 2017
Jun 2017
May 2017
Apr 2017
Mar 2017
Feb 2017
Jan 2017
Dec 2016
Nov 2016
Oct 2016
Sep 2016
Aug 2016
Jul 2016
Jun 2016
May 2016
Apr 2016
Mar 2016
Feb 2016
Jan 2016
Dec 2015
Nov 2015
Oct 2015
Sep 2015
Aug 2015
Jul 2015
Jun 2015
May 2015
Apr 2015
Mar 2015
Feb 2015
Jan 2015
Dec 2014
Nov 2014
Oct 2014
Sep 2014
Aug 2014
Jul 2014
Jun 2014
May 2014
Apr 2014
Mar 2014
Feb 2014
Jan 2014
Dec 2013
Nov 2013
Oct 2013
Sep 2013
Aug 2013
Jul 2013
Jun 2013
May 2013
Apr 2013
Mar 2013
Feb 2013
Jan 2013
Dec 2012
Nov 2012
Oct 2012
Sep 2012
Aug 2012
Jul 2012
Jun 2012
May 2012
Apr 2012
Mar 2012
Feb 2012
Jan 2012
Dec 2011
Nov 2011
Oct 2011
Sep 2011
Aug 2011
Jul 2011
Jun 2011
May 2011
Apr 2011
Mar 2011
Feb 2011
Jan 2011
Dec 2010
Nov 2010
Oct 2010
Sep 2010
Aug 2010
Jul 2010
Jun 2010
May 2010
Apr 2010
Mar 2010
Feb 2010
Jan 2010
Dec 2009
Nov 2009
Oct 2009
Sep 2009
Aug 2009
Jul 2009
Apr 2009
Mar 2009
Feb 2009
Dec 2008
Nov 2008
Oct 2008
Aug 2008
May 2008
Apr 2008
Mar 2008
Feb 2008