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

Using zbar library with Xojo

You may know that MBS Xojo Barcode Plugin has classes for barcode generation and recognition. The zxing classes based on the open source zxing library can recognize various types, but sadly not all QRCodes recently.

To solve this we add support for the zbar open source library with our new ZBarMBS class. Since the library is GPL, you have to include the library file with the application and load it at runtime. You may get a zbar library from the project website or from our Libs folder in download section. Our example project shows how to load the library at startup of application. On Linux you may just be able to install libzbar0 package and get libzbar installed.



When you like to scan a barcode, get a picture for the barcode. Make sure contrast is good and your barcodes are fully visible with a bit of border space around. Since scanning is done in black and white, you can preprocess the image to increase visibility with auto leveling, e.g. AutoLevelMBS function. You call Scan() function and pass the picture and you receive an array with barcodes found. You may get multiple result with different quality values, so you may pick the highest one. Sometimes a few lines or some text is recognized as a barcode. To increase reliability you may limit the list of barcodes types you like to have and thus ignore all others.

Supported types includes EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.

Our tests show that zbar can recognize a few barcodes, which didn't work with zxingQRCodeReaderMBS class. But since we also found EAN and UPC barcodes recognized in zxing (see zxingMultiFormatUPCEANReaderMBS or zxingMultiFormatOneDReaderMBS class), but not in zbar. Well, you may eventually use both to see what recognizes what. (more)

Convert HEIF images if needed

Recently a client contacted us for a problem they have. A solution hosted via FileMaker Server with Web Direct shows a layout with a container. Users can click on a button to upload an image, which uses Insert from Device script step. But if the user has an iPhone, the uploaded image may be an HEIF one. The High Efficiency Image File Format is great to preserve images in high quality, but other tools may not be able to read it. And we run into the problem, that the container is marked to be of type JPEG, which confuses other scripts (see Container.GetTypes function).

 

Here is a script to look on the inserted image and convert it to PNG with our Container.ReadImage function:  

 

# let user take a picture

Insert from Device [ Contacts::Photo Container ; Type: Camera ; Camera: Back; Resolution: Full ] 

# check filename

Set Variable [ $name ; Value: GetAsText(Contacts::Photo Container) ] 

Set Variable [ $extension ; Value: Right ( $name ; 5 ) ] 

If [ $extension = ".heif" or $extension = ".heic" ] 

# we got a HEIF image

# get new file name

Set Variable [ $name ; Value: Substitute($name; ".heif"; ".png") ] 

Set Variable [ $name ; Value: Substitute($name; ".heic"; ".png") ] 

# now convert to PNG

Set Variable [ $image ; Value: MBS( "Container.ReadImage"; Contacts::Photo Container; "PNG"; $name ) ] 

If [ MBS("IsError") = 0 ] 

# save on success to container

Set Field [ Contacts::Photo Container ; $name ] 

Else

Show Custom Dialog [ "Read Image Failed?" ; $image ] 

End If

End If 

 

As you see we also rename the name for the container, so it matches the content. You can decide if you prefer JPEG (smaller, no alpha channel), PNG (higher quality and alpha channel possible) or another type.

This script can be used on FileMaker Server on macOS where our plugin can use the built-in system functions. Otherwise you can run it in FileMaker Pro or in your iOS app based on the FileMaker iOS SDK.


Custom Functions stored in a database

Since we got this nice database for JavaScript to do custom functions (see blog article: Custom Functions in JavaScript), we further thought about doing this with FileMaker directly. Imaging to have your custom function in a central start database. Your solution opens, defines your own environment to store them and then loads all your custom functions from a table in the database. You may even have flags to define which are active vs. inactive, testing vs. production quality or maybe limited to admins. Once you have them loaded in memory, you can call them anywhere in any open file as long as FileMaker is running.

Here is our example database:

As you see we can define functions with as many parameters as needed. Then you enter the body of the function with whatever code you have in your custom functions. We got a button for macOS to format the calculation with our Syntaxcoloring functions. Then we got a button to check errors, which will let FileMaker parse your code with the parameter definition included, so we can find syntax errors. Sadly we can't tell where the error is exactly, but we may tell you if the syntax is okay or what error code we got. (more)

MBS FileMaker Plugin, version 11.3pr3

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

MBS Xojo Plugins, version 21.3pr3

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

Custom Functions in JavaScript

We saw a presentation at dotfmp conference from Philipp Puls about him storing his custom functions in a table inside the database. With help of one custom function in FileMaker itself, he can run them all. This dispatcher function would use execute SQL functions in MBS FileMaker Plugin to query the expression by name, then add the parameter inside and evaluate it. Quite convenient to have all custom functions stored in one database. Based on that idea we developed two new ways at MBS to do custom functions in JavaScript and later without.

Custom Functions in JavaScript

Since MBS FileMaker Plugin comes with a built-in JavaScript engine, which works without web viewer and even on a server side script, we can use it to define custom functions, which we can call anywhere in FileMaker:



This example database included with 11.3pr2 shows how to do it. It sets up the whole thing in the start script. With JS.New we make a new JavaScript environment with the special name "js". Instead of getting a handle number from the plugin, we define the identifier ourselves. This way we can refer to this JavaScript environment everywhere. It's global for all files and all solutions opened in FileMaker and can be initialized in FileMaker Pro, Server (Scripting + Web Direct) as well as FileMaker iOS SDK based applications. (more)

Follow up on good virtual conferences

Event planning strategies for virtual conferences, online events and hybrid meetings

After my blog post What is needed for a good virtual conference from last weekend, I got some feedback. Thanks for everyone replying. The setup listed in the blog post was heavily inspired from the dotfmp conference, but other conferences may have a different and less chaos in the setup.

After over a year of virtual conferences, online meetings and a lot of cancellations, people are eager to get back to normal live. While some enjoy the virtual conferences, others dislike them. When we talked about the user group, it looks like some groups like to stay virtual, but others want to go back to local meetings in-person. Other groups may mix virtual meetings for presentations and in-person restaurant meetings for the social gathers. Like one month virtual and other month in-person. Quite a few people want to travel again, so long term virtual only conferences may no longer happen. (more)

Xojo Android Summer Preview

Xojo Inc. continues their way to add Android to the their Xojo development tool. To given an update there is a video on YouTube to watch and a blog article:



After a few years of development the various branches come together. The UI classes (Mobile prefix) are getting ready, a lot of the framework parts are getting ready and the compiler also seems to work. This video shows the debugger with breakpoints and variables for the first time. And the classes for Android are the same as for iOS, except a few specifics. Currently there is a AndroidMobileTable vs the iOSMobileTable, but I hope that will get unified and we have one project for iOS and Android.

Sounds like most of the framework got ported already with a few classes still missing like Clipboard or introspection. Declares may work although we don't know how they work and whether they declare to Java libraries or to C libraries or both. We have not seen anything about plugins so far. Software needs to ship eventually, so at some point the team may decide which feature goes into first release, and what stays on the backlog. Plugin support including built-in plugins like XML, RegEx, XojoScript or Crypto may not make the first release. If that helps to ship it a few months earlier, it is fine for me.

There is no time frame indicating when Xojo with Android will ship. At the current rate, this may get finished in winter. We may see it shown off at XDC in London next year. Whether this will be release or availability of a beta depends on the progress made till then. If things go quick, the pre-release testers may see it earlier, maybe even as a Christmas surprise.

Someday a beta will be given to testers. If you like to be part of a tester group, make sure you are signed up for the Xojo forum, the testers section there and you can try the next version in development.

MBS @ FMTraining.TV

Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family.

A few days ago Christian Schmitz from Monkeybread Software joined a live episode to talk a bit about the MBS FileMaker Plugin. Watch it on YouTube.


Do you like this video?
Please let Richard know and send him your wishes or ideas for future live broadcast as well as topics for training videos. And check out the FileMaker Training bundles as well as their new book for FileMaker, updated for2021.

Check for Adobe Reader for IE11

If you use WebViewer in FileMaker or HTMLViewer in Xojo on Windows with IE11 engine and you show PDF documents, you need a PDF plugin for IE. To check whether you have Adobe PDF Reader browser support installed for IE11, please start Internet Explorer (not Edge!), then go to the menu (gear icon in the toolbar on the right) and to the Manage Add-ons dialog:



Select toolbars and extensions first on the left, then go down to pick all add-ons in the popup menu. Then on the right, you should see Adobe PDF Reader in the list. This should show 32-bit and 64-bit versions there. If one is missing, repair your Adobe Reader installation. Seems like one version of Adobe Reader shipped this year where the 64-bit part was missing. You may get current one where it is included again.

PS: See also Windows updates breaks PDF display in FileMaker

Windows updates breaks PDF display in FileMaker

Please be aware that Microsoft Windows got an update KB5003637, which breaks FileMaker displaying PDFs in an interactive container.

You may want to not install this update for some time or uninstall it when you find it installed.

An upcoming FileMaker release may switch to use Edge/Chrome for rendering PDF documents, so this will get fixed soon by Claris.

Alternatively you can use our MBS FileMaker Plugin to render PDF pages (DynaPDF.RenderPage) and have them show as JPEG or PNG pictures in a container.

See also posting in Claris Community: Suddenly PDF are not shown in FileMaker (since today !) in multiple computer / different customer

MBS Xojo Plugins, version 21.3pr2

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

MBS FileMaker Plugin, version 11.3pr2

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

MBS @ FMTraining.TV

Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family.

On Wednesday, 9th June 2021 at 1 PM PDT (22:00 o'clock in Germany), we may show you a few MBS Plugin examples and answer questions:



Please bring questions!

Atlanta Xojo Virtual Users Group LUNCH meeting

The Xojo group in Atlanta does another virtual meeting and since it is a lunch meeting, people from Europe have an easier time to join:

Hello Xojo fans,

We’re trying something new! We’ll be holding our monthly meeting tomorrow from 12noon to 1pm Eastern. Bring all of your Xojo and technology questions.

Meeting address: https://meet.jit.si/XojoATL
Password: Tacos
Time: 12noon to 1pm Eastern

Hope to see you there!

-Kevin

Atlanta EDT 12:00 = CEST 18:00 for me in Germany = 09:00 PDT for US West Coast

See you later there!

Tip of the day: StringValueX for database access

If you like to use databases in Xojo, you can use various plugins. There are built-in plugins for MySQL, SQLite, Microsoft SQL Server, PostgreSQL, Oracle and ODBC. And as an alternative you have MBS Xojo SQL Plugin with support for over 15 clients: CubeSQL, Centura SQLBase, DB2, Firebird, Informix, InterBase, MariaDB, Microsoft Access, Microsoft SQL Server, MySQL, ODBC, Oracle Database Server, PostgreSQL, SQL Anywhere, SQLite, SQLCipher and Sybase.

Unless you use our plugin, which handles unicode well, you may run into the problem that StringValue doesn't return a string with encoding set. So we usually refer to code like the one below in a module to get a StringValueX to return string in a defined encoding:

(more)

What is needed for a good virtual conference


Let's collect what you may need to run a virtual conference. This blog post may be updated later to add more details, so please send us feedback. MBS has hosted over 10 conferences/events in the past, but since we may run a virtual one someday, let's think about what may be needed for a company to run such a virtual conference:


Attendees

  • Virtual conference, so no per person cost like food or chairs, so make it free to join.
  • Use existing logins for company's forum/community to avoid people register again. Preferable single sign-on for everything.
  • Email all your users, prospects and customers to let them know, early to mark dates in calendar and later to remind them.
  • Take signups before and while the conference runs.
  • Let attendees sign a checkbox or so for them being okay with recordings showing them if they ask a question or present in a session.
(more)

MBS @ FMTraining.TV

Check out the FMTraining.tv website. Richard Carlton and his team do a daily free live stream about FileMaker to watch. And they have a huge library of FileMaker training material to watch and learn all about the Claris FileMaker product family.

A few days ago Christian Schmitz from Monkeybread Software joined a live episode to talk a bit about the DynaPDF functions in the MBS FileMaker Plugin. Watch it on YouTube.



Next video stream with MBS will be on Wednesday, 9th June 2021. And the recording from the Q&A session from 4th June 2021 should be available soon.

Do you like this video?
Please let Richard know and send him your wishes or ideas for future live broadcast as well as topics for training videos. And check out the FileMaker Training bundles as well as their new book for FileMaker, updated for2021.

MBS Xojo Plugins, version 21.3pr1

New in this prerelease of the 21.3 plugins:
  • Added AddCrossOriginWhitelist, RemoveCrossOriginWhitelist and ClearCrossOriginWhitelist methods to ChromiumBrowserMBS class.
  • Added allowsImplicitAnimation property for NSAnimationContextMBS class.
  • Added DeleteNamedDestByIndex and DeleteNamedDest methods for DynaPDFMBS class.
  • Added ExcludeCSCount property, ExcludeCS and setExcludeCS methods to DynaPDFOptimizeParamsMBS class.
  • Added OptionCAInfoBlob and OptionProxyCAInfoBlob properties to CURLSMBS class.
  • Added OuterBorder property for DynaPDFBarcode2MBS class.
  • Added pasteboardWriterForItem event for NSCollectionViewControlMBS control.
  • Added registerCloudKitShare and registerCloudKitShareWithPreparationHandler to CKContainerMBS class.
  • Added setDraggingSourceOperationMask method to NSCollectionViewMBS class.
  • Added zbar library support with new ZBarMBS class.
  • Changed MapKitViewControlMBS control to not raise exception on Windows/Linux if not supported.
  • Fixed an issue with IDE crashing when you have a PDFViewControlMBS on a container in a window.
  • Fixed bug with RenderPagePicture function in DynaPDFMBS not picking right page size for rotated pages.
  • Fixed CKAcceptSharesOperationMBS constructor to proces the CKShareMetadataMBS objects.
  • Fixed underflowColor and overflowColor parameters for setColorScale and setColorGradient methods in CDColorAxisMBS class.
  • Fixed an issue with SetLocale in SQL Plugin, introduced in 21.2. Now using C locale for Windows.
  • Improved our StyledText.RTFDataMBS function to handle line breaks better.
  • Updated curl library to version 7.77.0.
  • Updated DynaPDF version 4.0.53.147.
  • Updated openssl library to version 1.1.1k.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/ or from Dropbox.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 11.3pr1

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

Older blog entries:

2021-06-02 MBS Xojo Plugin, June 2021 News
2021-06-01 MBS FileMaker Plugin, June 2021 News
2021-05-27 DynaPDF for iOS
2021-05-26 New in MBS FileMaker Plugin 11.2
2021-05-26 News from the MBS Xojo Plugins Version 21.2
2021-05-22 Find new records with RowID
2021-05-22 Release notes for our Xojo plugins
2021-05-18 MBS FileMaker Plugin 11.2 - More than 6500 Functions In One Plugin
2021-05-18 MonkeyBread Software Releases the MBS Xojo Plugins in version 21.2
2021-05-18 Neues MBS FileMaker Plugin 11.2
2021-05-14 MBS Xojo Plugins, version 21.2pr8
2021-05-14 MBS FileMaker Plugin, version 11.2pr8
2021-05-11 Smooth scrolling list control with ContainerControls
2021-05-11 Improving our OCR functions for FileMaker Server
2021-05-11 MBS Xojo Plugins, version 21.2pr7
2021-05-11 MBS FileMaker Plugin, version 11.2pr7
2021-05-10 Bitsundso Download
2021-05-10 Linux System Info
2021-05-04 MBS Xojo Plugins, version 21.2pr6
2021-05-04 MBS FileMaker Plugin, version 11.2pr6

Archives

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