FileMaker Conference in Montreal, Canada

In a few weeks FileMaker developer from Québec in Kanada meet for a conference in Montréal:


The 5th edition of theConférence québécoise des développeurs FileMaker (CQDF) will take place on 25, 26 and 27 May 2015 Hotel Le St-Sulpice, located in Old Montreal. MBS will be present with a short presentation and available all days for questions and personal demonstration of the plugin features you like to learn more about.

Tip of day: Save Xojo report to PDF

Yesterday one of the attendees of the conference asked if we could update his Mac app to write a Xojo report to PDF directly. OS X can print to PDF, so we use our MBS Plugin classes to redirect printing to a PDF file with code like this:
Dim ds As New GasDataSet Dim ps As New PrinterSetup Dim rpt As New GasPricesReport 'this is a report editor project item 'set the resolution to 300 DPI for printing ps.MaxHorizontalResolution = 300 ps.MaxVerticalResolution = 300 // change PrinterSetup to point to print to PDF file dim s as new NSPrintInfoMBS s.SetupString = ps.SetupString s.SetSaveDestination SpecialFolder.Desktop.Child("test.pdf") ps.SetupString = s.SetupString // now print report Dim g As Graphics = OpenPrinter(ps) If g <> Nil Then If rpt.Run( ds, ps ) Then 'if the report runs successfully rpt.Document.Print(g) End If End If
As you see we use the NSPrintInfoMBS class to manipulate PrinterSetup's setupString to target the PDF file. The code above is from the modified Gas Reports example coming with Xojo.

Quickly copy lots of records

We got a new idea on how to copy a lot of records from one FileMaker table to another. And those tables can be in different fields. We can preserve the data type, so everything is not converted to text while copying. And we can do modifications like have source and dest use different field names. Finally you can include calculations and join data from several tables.

How we do it?

We combine a SQL select query with insert commands. So we can make a query and use result to create new records.
For that we got two new functions for next plugin version: FM.InsertRecord and FM.InsertRecordQuery.

Now you can call it like this:
MBS( "FM.InsertRecordQuery"; ""; "ExportContacts"; "First¶Last¶Company"; ""; "SELECT \"First\", \"Last\", \"Company\" FROM Contacts" )

This will query the fields First, Last and Company from a table called Company in current file. Than it will insert those as new records into the table ExportContacts.

Another example here:
MBS( "FM.InsertRecordQuery"; ""; "SalesReport"; "SumSales¶CustomerID"; ""; "SELECT sum(\"InvoiceTotal\"), \"CustomerID\" FROM Contacts, Invoices GROUP by CustomerID" )

This does create records in table SalesReport. For the query we use SQL features like grouping by CustomerID and summing up the InvoiceTotal fields. This way we can easily collect data for a sales report into a new table. This table can than feed a chart or be exported.

What do you think? Is this useful? Will be included in 5.1pr7 soon. Or just email for a copy if you like to try.

Notes from the Xojo Keynote


You probably read more soon from Xojo's blog, Marc Zeedar's magazine or Bob Keeney's blog, but here are some notes from me:

For Xojo Cloud gets an updated price list and will double RAM and bandwidth numbers and get more virtual CPUs.

New in Web Apps: Drag and Drop. Asynchronous API without drag events. Just specify allowed data types and drag types (copy, link, move) and wait for drop events. You can specify a style for the control for drag being over.

On 64-bit support, Geoff showed a Feedback app in 64-bit running both on OS X and Windows built with LLVM.

The IDE get improvements soon with less tabs, less mouse usage and more keyboard use and less palettes/panes and better project navigation.

Xojo will add support for Linux ARM for targeting raspberry pi platform and similar.

There will be a new plugin format, written in Xojo including C libraries, images and sounds. And new plugins are per project. Source code is not included, just LLVM compiled code. That is the new plugin format for the future, but the old SDK will also be updated for 64-bit, too.

For iOS a few new changes are on the way to go including container controls, custom alert dialogs and custom table cells.

Retina support should finally come in Q4 and they also work on Windows high dpi support.

FileMaker meeting in Dallas

Yesterday we met with a couple of FileMaker developers from Dallas and enjoyed some excellent Mexican food:



Talking about FileMaker's future, problems and chances, new plugin ideas and use cases, about differences between Germany and USA and a lot of more.
It was a great time and well worth a 3 hour drive.

FileMaker Developer meeting in Dallas

Are you a FileMaker from Dallas, Texas area?

We meet with a group of FileMaker developers on Monday night, April 27th, and we're having a casual dinner get together. The meeting is at 6:30pm at Chiladas at 4448 Lovers Lane, Dallas, TX 75225 where Taylor Sharpe reserved a table for us.


If you like to come, please be sure to contact us so we know how many seats we need.

PS: Friday (1st May) is the regular meeting at 11am with FMNUG which you also can attend.

MBS Releases the MBS Xojo AudioPlayer Kit in version 1.0

Nickenich, Germany (April 26th, 2015) -- Monkeybread Software releases version 1.0 of the MBS Xojo AudioPlayer Kit.

The MBS Xojo AudioPlayer Kit provides you with a few useful classes for audio playback for your Xojo iOS application.
  • Wrapper for iOS AudioPlayer class in AVFoundation
    • Play sounds loaded from memory and file
    • Events like DidFinishPlaying
    • Audio Channel assignment
    • average and peak power per channel
    • volume, pan and rate controls
    • play, pause and stop methods
    • query/set current position
  • Midi Player class to use Appleā€™s midi synthesizer
    • Open digital synthesizer for midi note playback
    • query instruments and set instrument per channel
    • send midi notes
    • Start and Stop method
    • Volume, Tuning, Reverbvolume properties
    • query CPU load

Wrapper Features
  • For Xojo 2015r1
  • Using exception handling to track error
  • Test code included
  • All classes with MB postfix to avoid name conflicts.
  • All module definitions are protected to avoid conflicts
  • Inline documentation
  • Full Source code, no encryption
  • Works for 32bit and 64bit targets.
Our AudioPlayer Kit requires Xojo 2015r1 or newer.

The AudioPlayer Kit is available for $49 USD or 39 Euro (+VAT if needed).

You can learn more and try the sample application on our website.
Please do not hesitate to send us comments, questions or feedback.

MBS Xojo / Real Studio Plugins, version 15.1pr6

New in this prerelease of the 15.1 plugins:
  • Fixed bug with FTPParseMBS class not giving right name.
  • Upgraded Xcode to version 6.3.1
  • Added TesseractMBS.SetResolution.
  • Fixed MacHIDMBS to run also when a modal dialog is visible.
  • Fixed a bug where Calls plugin part would be included always for some projects.
  • Fixed crash with InitJPEG function introduced in pr5.
  • Added QCCompositionRepositoryMBS.loadPlugIn function.
Download: macsw.de/plugin. Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 5.1pr6

New in this prerelease of the 5.1 plugins:
  • Added Clipboard.GetFiles and Clipboard.SetFiles functions.
  • Upgraded Xcode to version 6.3.1
  • Fixed Twain.SetDuplexEnabled so you can now disable duplex.
  • Added OCR.SetResolution function.
  • Added parameter to Text.DecodeFromHTML to decode html entities, but leave xml entities there.
  • Added function FM.NULL to get null values to pass to SQL.SetParamValue(s).
  • Added parameter to XML.Query to ignore errors in parsing.
  • Added SQL.GetFieldValue, SQL.GetParamValue, SQL.SetParamValue and SQL.SetParamValues.
  • Added FM.SQL functions to get SQL results in native data types.
  • Added SerialPort.SetDataAvailableHandler and SerialPort.ClearDataAvailableHandler functions.
  • The Audit.Change function now returns an error message if the given table name is invalid.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

REALbasic and Real Studio still supported

While Xojo Inc. just delivered their release 2015r2 version, we still support REALbasic and Real Studio.

The reasons why people don't use the lastest version are very different. Some don't like the new IDE, some have older OS versions or older hardware to support and some don't want to spend money on a new license as long as their existing version works fine. For all of them, we have plugins at hand.

So even our latest addition to the plugin, the markdown classes, are available for REALbasic 2006r4 and even PowerPC. Enjoy it!

Execute SQL in FileMaker and get back native field types

Yesterday I met some FileMaker developers in Munich and in our discussion at one point there was a talk about the fact that executing SQL in FileMaker gives you only text. No way to get back the field value in it's original type. Containers are returned as file name, dates/times converted to text as well as numbers.

So today I wrote a few new plugin functions:

FM.SQL.Execute takes a SQL query and optional a file name and parameters. The query is executed and the function returns an error message or on success a reference number. This reference number can be used to query data from the result. FM.SQL.RowCount tells you the number of rows while FM.SQL.FieldCount tells you the number of fields in each row. FM.SQL.Field returns a field value and FM.SQL.FieldType the type of that field. Finally you use FM.SQL.Release to release the result from memory.

The great thing is that you can now use the plugin to run queries and get containers, dates, times and numbers back from the result without conversion to text. With next prerelease plugins we'll include an example database which shows this.

FileMaker and Xojo Meetings for Munich and Nuremberg

We arrived in Munich and enjoy the city. Tonight is our Xojo meeting followed by the FileMaker meeting tomorrow.
Someone wants to join? We already have a couple of people on the list, but one or two can be added spontaneously.

16th April, Xojo meeting in Munich
17th April, FileMaker meeting in Munich
20th April, Xojo meeting in Nuremberg
21st April, FileMaker meeting in Nuremberg

If you like to join us for dinner, please add yourself. We'll reserve a table in a nearby restaurant, meet and chat about development. Entry is free, but you have to pay for your dinner and drinks.

MBS FileMaker Plugin, version 5.1pr5

New in this prerelease of the 5.1 plugins:
  • Fixed a problem with Audit function not writing data in FileMaker 12.
  • Optimized some functions for future FileMaker version.
  • Functions like IsServer now also work if demo mode expired.
  • Improved some of the Windows Webviewer functions to handle memory usage better.
  • Added Windows support for WebView.LoadHTML.
  • Fixed a bug with WebView.GetFormTextAreaValue on Windows which did crash sometimes.
  • Added MarkDown functions.
  • Fixed WebView.SetFormSelectValue to work also if there is no form name given.
  • The Webviewer Form and Field functions now find fields and forms by ID on Mac and not just by name.
  • Fixed bug in Text.EncodeToHTML.
  • Upgraded Xcode to version 6.3
  • Future plugin versions may decide to query server for update information while in development.
  • Added EnvironmentVariables functions.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

MBS Xojo / Real Studio Plugins, version 15.1pr5

New in this prerelease of the 15.1 plugins:
  • Improved some of the Windows Internet Explorer HTMLViewer functions to handle memory usage better.
  • Added HTMLViewer.IELoadHTMLMBS function to load html into HTMLViewer on Windows without temp file.
  • Added FieldID caching for Audit logging to speed up some queries for Field IDs.
  • Fixed memory leak if you use JPEGImporterMBS.InitJPEG twice without FinishJPEG in-between.
  • Added checks to SUUpdaterMBS to raise exceptions if you use class without loading framework.
  • Added markdown classes.
  • Added CIImageMBS.RenderPictureWithAlphaMT function.
  • Upgraded Xcode to version 6.3
  • Added properties and constants to NSEventMBS for force touch.
  • Future plugin versions may decide to query server for update information when used in the IDE.
Download: macsw.de/plugin. Or ask us to be added to our shared Dropbox folder.

Bug of the day: onbeforeunload crash

Today I spend a couple of hours tracking down a bug with FileMaker and webviewer.

So if you load a webpage in a webviewer and this website installs window.onbeforeunload event and you close the FileMaker window or switch to layout mode, FileMaker crashes.
Normally the onbeforeunload event is used to warn user that closing window will loose form data. This is normally very useful, but FileMaker doesn't wait for the dialog to complete. Instead it crashes.
To solve this problem I found after a few hours that you only need to clear the onbeforeunload event like this:

MBS( "WebView.RunJavaScript" ; "HTMLEditor"; "window.onbeforeunload = null;")

So the solution for client we simply call this whenever we do something with webview and especially before we switch layout.

German FileMaker Conference in Hamburg

The German Filemaker conference is scheduled for Hamburg from 8th to 10th October 2015.


Registration is opened and 180 guests are expected to come. Last year sold out, so be quick.

MBS Xojo / Real Studio Plugins, version 15.1pr4

New in this prerelease of the 15.1 plugins:
  • Added functions for WebUIDelegateMBS class to support multiple selection in file dialog.
  • Added CaseSensitive parameter for Map and Set classes.
  • Added new Map, Set, HashMap and HashSet classes supporting text data type.
  • Fixed memory with substring functions in RegExMBS class.
  • Improved error message handling for Firebird database connector part in SQL Plugin.
  • Added more methods for NSTextAttachmentMBS class.
  • Fixed bug in NSTextAttachmentMBS.attributedStringWithAttachment.
  • Fixed NotifcationObserverMBS.
  • Setting Modality property in NavigationDialogOptionsMBS to app modal by default now.
  • Added Destination MemoryBlock parameter for ReadRGB and ReadRGBMemoryStep in TiffPictureMBS class.
  • Added CGDisplayMBS.RefreshRate function.
  • Added enabled, color and image properties to NSTabViewItemMBS.
  • Improved NSTabViewItemMBS to have debugger visible properties.
  • Added option MySQLRetryAutomaticallyOnDeadLock for SQLCommandMBS. If true, the plugin will retry query 3 times in case MySQL reports a deadlock.
  • Added WindowBitmapMBS module with HBITMAP and HDIB related functions.
  • Added HBitmapToPictureMBS and PictureToHBitmapMBS functions.
  • Added CreateHBITMAP functions for GM16ImageMBS, GMImageMBS, IMImageQ8MBS, IMImageQ16MBS and IMImageQ32MBS.
Download: macsw.de/plugin. Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 5.1pr4

New in this prerelease of the 5.1 plugins:
  • Added SQL.GetFieldNameList, SQL.GetFieldValueList, SQL.GetParamNameList and SQL.GetParamValueList functions.
  • Added Plugin.SetSuccessReturn function.
  • Added Folders.UserTrash function.
  • Added WebView.InstallMultiFileOpenDialog function to allow multiple selection file dialogs in a webviewer.
  • Changed PDFKit preview rendering of PDF pages to take care of rotation.
  • Added FM.DisableMouseWheel for Windows to block mouse wheel usage.
  • Improved error message handling for Firebird database connector part in SQL functions.
  • Changed RegEx.FindMatches to switch ReturnWholeMatch parameter to true if you don't have captures in your search pattern.
  • Added Plugin.SetSuccessReturn and Plugin.GetSuccessReturn to modify what plugin returns for success.
  • Added SQL error code into error messages for SQL.Execute and other functions.
  • Fixed problem in Files.GetPathFromNodeID function.
  • Added text encoding parameter for Barcode functions. Default stays at UTF-8.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Multiple file selection for WebViewer/HTMLViewer

With HTML 5 the HTML Input File tag can have a multiple attribute and allow multiple files to be selected. But you only get that in an application if the application supports it. FileMaker and Xojo don't not really support it, but we can add it with our plugin:


For MBS FileMaker Plugin you can use the WebView.InstallMultiFileOpenDialog function. The next time you click such a file button, the dialog allows multiple selection if website supports it also.

With MBS Xojo Plugin, you can use WebUIDelegateMBS class. We'll add there new methods and parameters for multiple files support.
All coming soon with new plugin prerelease.

Bug of the day: Not enough arguments

A normal day in work. I already filled a few new bug cases for both Xojo and FileMaker.
And some things drive you crazy. Like this one:



What do I now? Double clicking it brings me to the window editor. This happened in a huge project with dozens of windows and this window with that error reported has something like 50 controls on it and tons of methods and properties. To show the size of the project, well printed source code would fill over 3500 pages here. No idea what modifications causes this and how to find it, but we can check svn for recent changes. What do you do if project is not in a version tracker? Get a copy from last backup?

Well, first I'd like to point out that a compiler has to report errors as detailed as possible. I personally hate an error where compiler doesn't tell me where something happened. Web projects love to tell me that there was an exception, but can't tell me where, because it's somewhere in the framework and a secret. Over time some developers including me made feedback cases for more helpful errors and exceptions with messages giving details. For example OutOfBoundsException (Case 12703), Illegalcastexception (Case 31571, implemented), TypeMismatchException (Case 38829) and NilObjectException (Case 18190).

Now the problem above. It's a method calling a method in parent class via super and it's missing parameters. A small problem and normally those missing parameters are reported correctly. Just with super there are problems. I hope it's fixed soon.

PS: Feedback case 38824.

Tip of the day: MySQL Error 1213

With MySQL it can happen that you get an error 1213 with message "Deadlock found when trying to get lock; try restarting transaction". Our MBS Xojo SQL Plugin will report that as exception or through error properties. Now we had the idea that we do the restart of the operation for you. So if you set with next plugins (15.1pr4) the option MySQLRetryAutomaticallyOnDeadLock to true for either Command or Connection, the plugin will try three times. If it gets error 1213, it will automatically try again after waiting 10 milliseconds.

The reason we put it in the plugin right in the execute method is to make sure all attempts can happen in background on the same thread. Using ExecuteMT we do the operation on a preemptive helper thread and if we need two or three attempts the other threads of your application are not influenced and do their work as usual.

Update: This is for a small application which does not use transactions. If you use transactions, this switch may result in problems as it does only repeat last SQL command. If you use transactions, please code it yourself and do proper rollback and start again with a new transaction.

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