Our Blog, FileMaker only, Xojo only, Archive (older)     Follow us on Twitter, Xing, LinkedIn or Facebook.

MBS Xojo Plugins, version 21.1pr8


New in this prerelease of the 21.1 plugins:
  • Added iOSPictureMBS module with methods and delegates to export video or image to camera roll.
  • Deprecated SetLicenseKey function for DynaPDFMBS class. Please use SetLicenseKeyGlobal instead.
  • Fixed an issue with OpenDialogMBS class not returning folderitems properly for alias files.
  • Updated DynaPDF to version 4.0.49.139.
  • Enabled math functions for internal SQLite library for next SQLite version. (see InternalSQLiteLibraryMBS module)
  • Added isObject, isArray, isNumber, and isBoolean to JSONMBS class.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 11.1pr8


New in this prerelease of version 11.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

LibXL Extras for Xojo


You may have seen that we wrap LibXL into a plugin for Xojo: The MBS Xojo XL Plugin. We support all the built-in features from LibXL like read/write Excel documents. That includes older XLS or newer XLSX format as well as templates. But we add a few of our own developments related to Xojo around that. Let us show you.

We have eight classes for you:
  • XLBookMBS is the base class for a document.
  • XLSheetMBS describes the individual sheets in an Excel document.
  • XLFormatMBS defines the formatting of a cell, which may include a font definition.
  • XLFontMBS defines a font specification. That may be as simple as bold or a color.
  • XLFilterColumnMBS defines filter options for a column.
  • XLAutoFilterMBS provides the properties for auto filter options.
  • XLCopyOptionsMBS are used for our copy functions to define what to copy.
  • XLRichStringMBS allows access in detail on styled text.
Styled Text

We don't just provide you functions to use rich text with XLRichStringMBS class. We got further and allow you to convert the rich text in Excel into the styled text as Xojo uses it. StyledText function on the class will convert the content to StyledText and return it, so you can directly assign it to a TextArea control. With the AddStyledText method you can add text from a TextArea control into a new XLRichStringMBS object.

For your convenience the XLSheetMBS class has a method WriteStyledText, where you can directly pass StyledText from TextArea control to assign styled text to a cell. Our ReadStyledText function will read a cell containing rich text and translate to StyledText object for Xojo. (more)

LibXL for FileMaker with extras


For a few years we have worked on integrating the LibXL library and making functionality available for FileMaker. Beside all the standard built-in features from LibXL to read/write Excel files, we have some extra functionality developed ourselves:

Copy Cells

LibXL comes with a copy cell command, see XL.Sheet.CopyCell. Beside that we added XL.CopyRow to copy content of a row. Similarly XL.CopyColumn copies a column. As you can pass different book reference numbers, you may even copy from one document to another one or copy from one sheet to another sheet within the same document.

The XL.CopySheet function can copy the content of a sheet to another document, great if you like to extract one sheet from one document and copy it to a new document. Finally we made XL.CopyContent to copy the content of all sheets into a new document. That helps to convert between XLS and XLSX, older and newer Excel formats in both directions.

TimeStamps

Since FileMaker uses timestamps, we have XL.Date.DoubleToTimeStamp and XL.Date.TimeStampToDouble functions to convert the numeric time values in Excel to/from timestamps in FileMaker.

The XL.Sheet.CellWriteDate function writes a timestamp or date from FileMaker directly into a cell. You still need to pass a format parameter referencing the date format to show the value later. (more)

xDev Magazine 19.2


The March/April (19.2) issue of xDev Magazine is now available. Here's a quick preview of what's inside:

Deja Vu by Marc Zeedar
Are you getting tired of API and technology transitions? Does it seem like you're always having to redo perfectly good code because of an OS update?

Getting Started with DynaPDF by Stefanie Juchmes
If you need more PDF power than you can get with Xojo's built-in PDF classes, you should check out Monkeybread's DynaPDF plugin. Stefanie will show you how!

Shake It! by Markus Winter
You know how when you enter an incorrect password on the Mac the dialog will shake to show you it's wrong? Markus has figured out how to do that with pure Xojo.

Maps Part 9 -- Putting GPS Data on the Map by Markus Winter
This time Markus helps a reader by showing how to plot GPS coordinates on a map.

Application Instance by Christian Schmitz
Did you know you can tag an application download with a unique identifier? It's a little tricky, but Christian shows you exactly how to do it.

Plus: Creating a web service with Xojo, picture fills, scrolling pictures, and much more!

MBS Xojo Plugins, version 21.1pr7


New in this prerelease of the 21.1 plugins:
  • Added HTMLText or PlainText methods to WebView2ControlMBS class.
  • Added IsNull function to JSONMBS class.
  • Added IncludeDataInDebugMessages for FMConnectionMBS class.
  • Improved DeclareCallBackMBS class to handle asynchronously dispatch on Windows and Linux.
  • Added SetLogEventMask and IsLoggingEnabled shared methods to GMImageMBS class.
  • Fixed an issue with LZ4MBS decompression failing.
  • Fixed problem with DynaPDFMBS where an empty password was not passed as nil in OpenImportFile.
  • Updated SQLAPI to version 5.1.4b5.
  • Updated DynaPDF to version 4.0.49.137.
  • Added ResolutionUnit constants to JPEGExporterMBS class.
  • Fixed issue for iOS where Transporter complains about __INFO_PLIST segment in plugin library.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 11.1pr7


New in this prerelease of version 11.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

MBS Xojo Plugins, version 21.1pr6


New in this prerelease of the 21.1 plugins: Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 11.1pr6


New in this prerelease of version 11.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Data Detectors for Xojo


You may have seen Safari, Mail, Notes or other applications highlighting information in some text and they may offer to do something with the data, e.g. take a date and make a new event in your calendar or take an address and add it to your contacts.

Have you wondered how this works?

Apple provides data detectors in their frameworks to identify those data bits. We just added a new class NSDataDetectorMBS to use those in Xojo. While you can do a lot with regular expressions yourself, these pre-built detectors are convenient to use as they are.

You tell what to look for, either Date, Address, Link, PhoneNumber or TransitInformation. You can combine those types and look for multiple things together. The plugin then uses Apple's framework and returns the result as NSTextCheckingResultMBS objects for you to inspect. Let us show you the screenshot from our example project:



As you see we have a listbox with results. Each result has always the text found with the position and length to define the range in the original text. Then we provide the type of item found and type specific information. For a phone number this is simply an entry PhoneNumber with the number. If you need to format the phone number, check Using libPhoneNumber for phone number formatting. For an address, you may see Name, JobTitle, Organization, Street, City, State, ZIP and Country listed. Date results come with date, time zone and duration while links comes with an URL. The items we find are highlighted in the TextArea control in color.

Please try those functions later in the next days with our next pre-release and let us know how they work for you.

MBS Xojo Plugins, version 21.1pr5


New in this prerelease of the 21.1 plugins:
  • Added NSNetServiceMBS and NSNetServiceBrowserMBS classes for macOS and iOS.
  • Added runOnce method to NSRunLoopMBS class.
  • Upgraded BigNumberMBS to a 1280 bit floating point number for even bigger range and precision. 256 bit exponent and 1024 bit fraction.
  • Updated InstallDragImageMBS to support newer API and work in Xojo 2020 or newer.
  • Changed SQL Plugin to ignore or add @ in parameter name if needed.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 11.1pr5


New in this prerelease of version 11.1 of the MBS FileMaker Plugin: Download at monkeybreadsoftware.com/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

NSNetService classes for Xojo


We had for years the MBS Xojo Network Kit to provide Bonjour services for Xojo iOS applications.

Since Xojo 2020r2 can use plugins on iOS, we deprecated the Kit and now provide a replacement via NSNetServiceMBS and NSNetServiceBrowserMBS classes.

The classes includes:
  • asynchronously browses for domains to use
  • asynchronously browses for services with given type
  • asynchronously publishes services
  • query/publish TXT Record data.
  • Receive events for a service and in browser.
  • Parses IPv4 and IPv6 addresses
  • Encode and decode TXT record data.
Seems to work fine so far for console, web, desktop and iOS projects.

If you have needs for performing network tasks using Apple's frameworks, check NSURLSessionMBS class. It allows upload and download via lots of options and latest TLS encryption.

Coming soon with next pre-release. Please do not hesitate to send us comments, questions or feedback.


Markup for FileMaker on iOS


Did you know that iOS 11 introduced a feature to markup images and PDF documents right into the iOS system software?

A client asked for adding annotations to a PDF right on the iPhone or iPad with their custom FileMaker iOS SDK based application. We through first to use our PDFKit or DynaPDF functions. Those can do things like merge or render PDF documents. And DynaPDF has quite a few functions to create annotations via script. Great if you automatically want to do things, like adding clickable links via script. (see older blog posts). But this is all via script and the user wants to annotate manually with his finger (or a pencil). Recreating all the markup tools with native code or a web viewer is a lot of work.

When I asked what it should do exactly, the client opened the standard markup dialog in Apple Mail and said to do just use this one. And it turns out, we can do exactly that!

For next MBS FileMaker Plugin, we add this to our QuickLook functions. You can now use QLPreviewPanel.SetEditingAllowed function to allow editing. With QLPreviewPanel.SetDismissTrigger function you define the script to run when dialog is done and there you can query QLPreviewPanel.SavedFiles to get the saved file (if changes are made). Then import the PDF back into your FileMaker field.

The great thing is that you get all the markup features in FileMaker to work on PDF documents, add annotations, fill a form with text or draw something with an Apple Pencil.

Read more about Markup feature on Apple's website.

Coming soon with next pre-release and we made you a nice example database to try. Please do not hesitate to send us comments, questions or feedback.


Data Detectors for FileMaker


You may have seen Safari, Mail, Notes or other applications highlighting information in some text and they may offer to do something with the data, e.g. take a date and make a new event in your calendar or take an address and add it to your contacts.

Have you wondered how this works?

Apple provides data detectors in their frameworks to identify those data bits. We just added a new function RegEx.DataDetector to use those in FileMaker. While you can do a lot with regular expressions yourself, these pre-built detectors are convenient to use as they are. Here is our new function:

MBS( "RegEx.DataDetector"; CheckingType; Text )

You tell what to look for, either Date, Address, Link, PhoneNumber or TransitInformation. You can combine those types and look for multiple things together. The plugin then uses Apple's framework and returns the result as JSON for you to inspect. Let's take an example:

MBS( "RegEx.DataDetector"; "PhoneNumber"; "Phone us at (123)456-789 later!" )

With this result:
[
{
"length" : 12,
"position" : 13,
"text" : "(123)456-789",
"type" : "PhoneNumber",
"PhoneNumber" : "(123)456-789"
}
]
As you see we have a JSON array with results. Each result has always the text found with the position and length to define the range in the original text. Then we provide the type of item found and type specific information. For a phone number this is simply an entry PhoneNumber with the number. If you need to format the phone number, check Using libPhoneNumber for phone number formatting. For an address, you may see Name, JobTitle, Organization, Street, City, State, ZIP and Country listed. Date results come with date, time zone and duration while links comes with an URL.

Please try those functions later this week with our next pre-release and let us know how they work for you.

Installing a Xojo Web App Server


After installing several servers for a client with various configurations, I collected the notes and made a video for you guys:

Installing a Xojo Web App Server

We show how to install a virtual private server and run both Xojo 2019 and Xojo 2020 web apps. Maybe it is useful for you?


Vier Monate bis zur Deutschen FileMaker Konferenz 2021 in Malbun


Noch vier Monate bis zur FileMaker Konferenz 2021 in Malbun (Liechtenstein) und zur MBS Plugin Schulung Schulung am Mittwoch vorher.

Vom 17. bis 19. Juni 2021 findet die elfte deutschsprachige FileMaker Konferenz in Malbun, Liechtenstein statt. Aktuell läuft die Frühbucherphase bis 28. Februar mit vergünstigten Tickets.

Die Veranstalter vom Verein FM Konferenz erwarten auch 2021 rund 120 Entwickler, Anwender, IT-Fachleute und Entscheidungsträger aus Wirtschaft, Bildung und Verwaltung. Rund um über 20 Fachvorträge und Workshops wird es viel Zeit zum Vernetzen in den gemeinsamen Pausen und beim Abendprogramm geben.

Für den Deutschsprachigen Raum ist diese Konferenz das Treffen des Jahres. Hier finden Sie vom Anfänger bis zum Profi Kontakte zu anderen Entwicklern. Lernen Sie was es neues gibt, nehmen Sie Impulse mit für die eigene Arbeit und erfahren Sie mehr zu FileMaker von deutschsprachigen Experten!



Die MBS Plugin Schulung vorher findet voraussichtlich am statt im gleichen Hotel am 16. Juni 2021.

Bitte planen Sie wenigstens einen extra Tag ein für ihren Besuch in Liechtenstein, damit Sie die Natur in dem schönen Tal geniessen können. Den Aufstieg auf den Sareis können Sie bequem zu Fuß vom Hotel aus starten und die Turnastraße hinauf spazieren bis zum Restaurant am Gipfel. Oder alternativ die Seilbahn nehmen.

Hoffen wir, dass sich im Frühjahr die Corona Lage verbessert und die Konferenz stattfinden kann.

Understanding Memory Statistics


While looking for a memory leak in a Xojo app, I printed repeatedly Runtime.MemoryUsed value to the console and the object count with Runtime.ObjectCount. While objects and strings are created and destroyed, the memory used goes up regularly, often by jumps. Object count goes up and down as we do stuff in the application. So what is going on?

How is memory allocated?

When I remember the old days, over 20 years ago, where I used Turbo Pascal with DOS, the memory was allocated in paragraphs, a 16 byte unit. System memory was small in size (1 mega byte max) and even there allocating memory in smaller units was not done as it is highly inefficient to do so. And the memory model with Segments and Offsets made it convenient to only manage the segment part. Anyway, today memory is still allocated in 16 byte chunks with malloc, the C library to manage allocations.

When you allocate memory for an object or a string, the Xojo runtime will ask malloc for memory. And malloc eventually asks the OS for memory pages. A page is usually 4096 bytes, but can be bigger. I've seen computers with 16 KByte pages and newer Intel CPUs can do 4 MB per page. If you allocate a MemoryBlock of e.g. 5 MB, the malloc system will provide you straight away with such pages, maybe rounding up a bit or combining big and small page sizes. But for smaller allocations of 16 byte to 2048 byte, there will be pools. Since allocating pages has an overhead, malloc tends to allocate a bigger block, e.g. 1 MB for a new pool. There are pools for various sizes, e.g. 16, 32, 48, 64, 96, 128, etc. bytes in block sizes.

If you allocate a new string in Xojo with "Hello World", the malloc system will be asked for one block of 11 bytes (actual 12 for the Chr(0) on the end to be used as C string directly). This is rounded up to 16 bytes. If the pool for 16 byte objects is full, a new one is allocated of about 1 MB. That is why we see Runtime.MemoryUsed jump up by 1 MB regularly. There is some extra allocation for the tables used in management of those blocks.

When you free an object, it's marked as free. The block can be filled with a certain bit pattern to later detect reuse of freed memory. If all blocks in the given pool are free, the whole pool could be freed. But this usually doesn't happen. Getting pages from the OS is time consuming, so malloc prefers to keep the pool for later. But most of the pool may usually be marked as free. (more)

MBS Plugin extensions for Calculation Dialogs


You may have seen the earlier blog post about Custom Function Tools for FileMaker Pro. Once we showed this to people, we got a few ideas and one request was to include those buttons for the calculation dialogs in FileMaker in various places:



As you see we added a white box for the result and put a place holder text inside. And we had to do code to dynamically look for what controls FileMaker places there and measure their size to place our box between controls on the left and controls on the right. Let us know if we got it wrong in your FileMaker version or language.

Check 11.1pr4 to try this feature. Looks like the features work even in lots of older FileMaker versions down to version 14.
Please do not hesitate to contact us with questions.

MBS Xojo Plugins, version 21.1pr4


New in this prerelease of the 21.1 plugins: Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

Older blog entries:

2021-02-15 MBS FileMaker Plugin, version 11.1pr4
2021-02-12 RowSet in MBS Xojo SQL Plugin
2021-02-12 Tooltips for Script Debugger in FileMaker
2021-02-11 Use Inline Graphics in Emails
2021-02-10 Claris Platform Vision 2021
2021-02-09 MBS Xojo Plugins, version 21.1pr3
2021-02-09 MBS FileMaker Plugin, version 11.1pr3
2021-02-09 Xojo Leak Finder
2021-02-08 Custom Function Tools for FileMaker Pro
2021-02-08 FileMaker and Android
2021-02-08 RegEx Speedup
2021-02-07 Communication with an API with help of JSON
2021-02-05 MBS Xojo Plugins, version 21.1pr2
2021-02-05 MBS FileMaker Plugin, version 11.1pr2
2021-02-03 MBS Xojo Plugins Installation for Windows
2021-02-01 MBS Xojo Plugins, version 21.1pr1
2021-02-01 MBS FileMaker Plugin, version 11.1pr1
2021-02-01 DuckDB
2021-01-28 Edit and Update for SQLDatabaseMBS class
2021-01-27 MBS FileMaker Plugin for Apple Silicon

Archives

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
XML: RSS Feed XML: Atom Feed