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

AVRecorder on iOS


For next prerelease we fixed a few issues for AVRecorder functions on iOS for users of our plugin with MBS FileMaker SDK.

You can now better place the control on the layout with new AVRecorder.AddPreviewWithControl function instead of specifying a size. Depending on the layout the control functions may get the right position whether status toolbar is visible or not for all platforms. Please let us know if you find a case where the position is wrong.

On iOS you can just like MacOS enumerate the devices and pick devices with AVRecorder.SetVideoDevice or AVRecorder.SetAudioDevice. Then you can show preview with AVRecorder.AddPreviewWithControl or AVRecorder.AddPreviewToWindow function. If you like, take a picture with AVRecorder.CaptureStillPhoto function.

If you are interested in the live QRCode detection within the video picture, you can try AVRecorder.StartQRCodeDetection function and see if the plugin can recognize a QRCode using CoreImage filters. That is the same feature as used in the camera app itself on iOS.

Please don't hesitate to contact us with your questions.

MBS Xojo Plugins, version 20.3pr9


New in this prerelease of the 20.3 plugins:
  • Removed old RegisterMBSPlugin function taking integer parameter.
  • Added ValidNotBefore and ValidNotAfter properties for X509MBS class.
  • Updated VLC to version 3.0.11.
  • Fixed crash in Tracks function in VLCMediaMBS class.
  • Added EncodeBase64URLMBS and DecodeBase64URLMBS functions.
  • Added JWT RS 256 example project to sign or verify.
  • Added GetFileContents with isPath parameter to WinDataObjectMBS class.
  • Fixed a crash with cleanup of SQL clients for SQLConnectionMBS and SQLDatabaseMBS.
  • Added SubTitle, toolbarStyle and titlebarSeparatorStyle properties to NSWindowMBS class.
  • Added mediaType and pageZoom properties to WKWebViewMBS class.
  • Added PDFData method to WKWebViewMBS class.
  • Updated DynaPDF to version 4.0.40.116.
  • Added kcoResetAnnotAppearance constant to DynaPDFMBS class.
  • Added FlushPagesEx and ResetAnnotAP methods to DynaPDFMBS class.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 10.3pr9


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

Omegabundle for Xojo 2020 ends 31st July


Get the top developer tools and third party components for the Xojo cross-platform development platform at a huge savings until 31st July 2020.

Omegabundle for Xojo 2020 is a collection of the most useful tool sets, add-ons, digital books and components for use with Xojo Inc's Xojo development environment. If purchased separately and not including any additional offers, the total cost would be over $3,711.00. Omegabundle for Xojo 2020 costs $399. Buy now on the Paradigma Software store.



Xojo is an award-winning, cross-platform development tool for the Desktop (macOS, Windows, Linux), Web, iOS (iPad/iPhone) and Raspberry Pi. With Xojo, you can create native applications by using drag-and-drop to build your user interface and then one straight-forward programming language to enable the functionality. Xojo is powerful and modern, yet easy to use and learn. (more)

FileMaker Stammtisch in Wien


On my next visit to Vienna, we plan another developer meeting:

Wer hat Interesse an einem FileMaker Entwicklertreffen nächste Woche in Wien?

Einfach in gemütlicher Runde treffen in einem netten Restaurant und beim Abendessen was über FileMaker reden. Vielleicht habt ihr ja auch Fragen und Probleme, wo ich helfen kann?

Zeit wäre ca. 18 bis 22 Uhr, so dass man auch später kommen oder früher gehen kann. So ungefähr einen Abend im Bereich von 20. bis 23. Juli.
Treffpunkt steht noch nicht fest, vorzugsweise ein Biergarten.

Wer dabei sein möchte, bitte bei der Umfrage eintragen.

Falls sonst noch Bedarf an Schulung, vor Ort Entwicklung oder FileMaker/Xojo Hilfe besteht, bitte wegen Terminfindung bald melden.

Xojo Stammtisch in Wien


On my next visit to Vienna, we plan another developer meeting:

Wer hat Interesse an einem Xojo Entwicklertreffen nächste Woche in Wien?
ca. 18 bis 21 Uhr.

Einfach gemütlich zusammen sitzen in einem Restaurant oder Biergarten und über Xojo plaudern.
Gerne zeige ich auch neue Pluginfunktionen oder helfe bei Problemen mit Xojo Projekten. Einfach Computer mitbringen und was zeigen.

Wer noch dabei sein möchte, bitte bei der Umfrage eintragen.

JWT RS256 authentication in Xojo


Recently a client asked about JWT signatures. So we created an example project to create and verify JWT RS256 signatures in Xojo. This includes new EncodeBase64URLMBS and DecodeBase64URLMBS functions in MBS Xojo Encryption Plugin. We use SignData function in OpenSSLMBS class to sign the data and later use VerifyData function to verify the signature.

Create Signature

This example code takes values from fields on the window and creates the signature to show it in another field:

Sub Create() // take values from fields and make sure encoding is right and line endings Dim Header As String = Self.Header.Text.ConvertEncoding(encodings.UTF8) Dim Payload As String = Self.Payload.Text.ConvertEncoding(encodings.UTF8) Dim PrivateKey As String = ReplaceLineEndings(Self.PrivateKey.Text, EndOfLine.UNIX).ConvertEncoding(encodings.UTF8) Dim Password As String = Self.Password.Text.ConvertEncoding(encodings.UTF8) // now prepare string to sign Dim EncodedString As String = EncodeBase64URLMBS(header) + "." + EncodeBase64URLMBS(Payload) // sign it with RSA key and SHA 256 hash Dim Signature As String = OpenSSLMBS.SignData(EncodedString, PrivateKey, Password, OpenSSLMBS.kAlgorithmSHA256) // encode signature Dim SignatureEncoded As String = EncodeBase64URLMBS(Signature) // and build JWT RS 256 signature Dim result As String = EncodedString + "." + SignatureEncoded output.Text = result End Sub
(more)

Print web viewer on iOS


For next MBS FileMaker Plugin, we add iOS support for WebView.Print function, so you can show the print dialog and let the user print the website.

For WebView.SetPrintParameter function we add new settings for iOS, so you can set orientation to landscape or portrait and set the job name. More parameters can follow if there is a need.

Screenshot is in German, but it will be localized to whatever language you use in your application.

We also check if we can get WebView.Print to work properly on macOS. With macOS Big Sur newer APIs are coming, so it may work better there.

Coming soon in the next prerelease.


MBS Xojo Plugins, version 20.3pr8


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

MBS FileMaker Plugin, version 10.3pr8


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

Using DebugBar in Xojo for IE HTMLViewer


We found DebugBar, an extension for Internet Explorer and it still works in Windows 10, so we worked on an integration into Xojo as DebugBar doesn't do that as is.

For next MBS Xojo Plugins we add the new ShowDebugBar function for IEWebBrowserMBS class. Our plugin will look for the HTMLViewer in the window, then create a new window and host there the DebugBar component. Looks like this:



We have four tabs there. The first one allows you to inspect the DOM and you can use the green picker to select an element on the web site. If you move the mouse over one of the elements in the DOM tree, the element highlights on the website. You can also inspect styles and modify all in the text field below.
The HTTPs tab currently doesn't work, so check the Script tab, where you can see all JavaScripts, adjust them and execute some JavaScript right in the window.

There are a few issues and we'll see if we can resolve a few with the developers from DebugBar to make this as useful as possible for you. And they certainly appreciate if you buy a DebugBar license.

See   DebugBar website   Download   Features   Order

Please don't hesitate to contact us with your questions.

Using DebugBar in FileMaker for IE WebViewer


We heard the cries for an inspector for Windows and looked around for help. Recently we found Firebug, but that only works if you install it on the same domain. Our search continued and we found DebugBar, an extension for Internet Explorer and it still works in Windows 10, so we worked on an integration into FileMaker as DebugBar doesn't do that as is.

For MBS FileMaker Plugin 10.3 we add the new WebView.ShowDebugBar function. Our plugin will look for the web view in the FileMaker window, then create a new window and host there the DebugBar component. Looks like this:



We have four tabs there. The first one allows you to inspect the DOM and you can use the green picker to select an element on the web site. If you move the mouse over one of the elements in the DOM tree, the element highlights on the website. You can also inspect styles and modify all in the text field below.

The HTTPs tab currently doesn't work, so check the Script tab, where you can see all JavaScripts, adjust them and execute some JavaScript right in the window. See screenshot below:



There are a few issues and we'll see if we can resolve a few with the developers from DebugBar to make this as useful as possible for you. And they certainly appreciate if you buy a DebugBar license.

See   DebugBar website   Download   Features   Order

Please don't hesitate to contact us with your questions.

Xojo Developer Magazine 18.4


The July/August (18.4) issue of xDev Magazine is now available. Here's a quick preview of what's inside:

Introducing PowerXS (Part 1) by Marc Zeedar
Marc unveils his new framework cloning tool for XojoScripts that he was going to speak about at XOJO.CONNECT this year.

OOP Listbox (Part 2) by Markus Winter
Markus continues creating his object-oriented Listbox.

On the Scene Again (Part 3) by Stefanie Juchmes
More SceneKit, this time exploring solving and animating a popular brain teaser.

Porting a Mac App to iOS by Tom Baumgartner
How hard is it to port your Mac app to iOS? Tom recently did it and shows what it took.

MapKit (Part 5) by Markus Winter
Markus continues in his quest to draw maps with Xojo, this time going deeper into finding and displaying addresses.

PLUS: WWDC 2020, Xojo on Android, Web 2.0, Drag and Drop, Best of the Web, and more!

Mehrwertsteuersenkung


Vorübergehend bis zum Jahresende wurde in Deutschland die MWSt. von 19% auf 16% gesenkt.

Wenn Sie eine MBS Plugin Lizenz kaufen und aus Deutschland kommen, aber nicht vorsteuerabzugsberechtigt sind, können Sie ca. 2.5% sparen beim Einkaufspreis.

Für alle Geschäftskunden ändert sich effektiv nichts, weil Sie die Steuer ja verrechnet bekommen beim Vorsteuerabzug.

[English] VAT rate in Germany changed temporarily from 19% to 16%. While we appreciate a tax reduction, it's a hassle to implement for everyone with a shop, doesn't save much money for tax payers, but creates a big hole in the budget for the government.

FileMaker records to XML or JSON


Sometimes you need to query FileMaker records as XML or JSON data and include related records. This can be tricky to do in pure FileMaker scripts and calculations, but via MBS FileMaker Plugin we can provide help. Our FM.SQL.Execute function can use SQL to fetch records. The FM.SQL.CSV, FM.SQL.JSONRecord and FM.SQL.JSONRecords functions can help to pack those in comma/tab separated text or JSON. New for next plugin version are FM.SQL.XMLRecord and FM.SQL.XMLRecords functions to do for XML what we had for JSON already. 


Below we have a sample script to use FM.SQL.XMLRecords to get records from two tables and insert the related records in the right position in the XML with our XML.SetPathXML function.


# SQL XML in file Contacts


# Run query to fetch some records

Set Variable [ $sql1 ; Value: MBS( "FM.SQL.Execute"; ""; "SELECT \"PrimaryKey\", \"First Name\", \"Last Name\", \"Company\", \"Title\" FROM Contacts") ] 

# get them as XML

Set Variable [ $xml ; Value: MBS( "FM.SQL.XMLRecords"; $sql1; "people"; "person"; "ID¶First¶Last¶Company¶Title"; 2+1) ] 

# 

# loop over records to look for related record

Set Variable [ $count ; Value: MBS( "FM.SQL.RowCount"; $sql1 ) ] 

Set Variable [ $index ; Value: 0 ] 

If [ $index ≤ $count ] 

Loop

# get primary key from result

Set Variable [ $key ; Value: MBS( "FM.SQL.Field"; $sql1; $index; 0 ) ] 

# Run query for related records

Set Variable [ $sql2 ; Value: MBS( "FM.SQL.Execute"; ""; "SELECT Type, Number FROM \"Phone Numbers\" WHERE ForeignKey = ?"; $key) ] 

# get them as XML

Set Variable [ $xml2 ; Value: MBS( "FM.SQL.XMLRecords"; $sql2; "phones"; "phone"; "Type¶Number"; 2+1) ] 

# Now insert them in the person node as new child phones

Set Variable [ $xml ; Value: MBS( "XML.SetPathXML"; $xml; "people.person[" & $index &"].phones"; 0; $xml2 ) ] 

# don't forget to release memory

Set Variable [ $r ; Value: MBS( "FM.SQL.Release"; $sql2) ] 

# 

# next

Set Variable [ $index ; Value: $index + 1 ] 

Exit Loop If [ $index ≥ $count ] 

End Loop

End If

# 

# don't forget to release memory

Set Variable [ $r ; Value: MBS( "FM.SQL.Release"; $sql1) ] 

# Output the XML with format & color

Set Field [ Contacts::XML ; MBS("XML.Colorize"; MBS("XML.Format"; $xml)) ] 


We hope this helps people interested in XML exports. Same technique can be used with our JSON functions to build similar JSON structures.


PS: Script text copied with color using our copy button in Script Workspace.


Using WolfSSL and custom CURL functions


The fine people at WolfSSL have a few impressive products around SSL, Encryption and SSH with an emphasis on the performance and on a small footprint. Since CURL already offers multiple SSL backends, we could build our plugins using wolfSSL.

CURL is doing well and we are using it now for over 10 years in our plugins for various tasks including HTTP, FTP, SFTP and email via IMAP or SMTP protocols. See the state of CURL video where Daniel explains the progress.

Compared to the OpenSSL library we use currently for most things, wolfSSL has a lot to offer:
  • If you are concerned about memory usage, check wolfSSL as it uses less memory.
  • When you need a cross platform SSL library, it offers latest TLS 1.3 with DTLS 1.2.
  • They include hardware support for encryption, so if you have acceleration hardware in your computer, they can use it.
  • While wolfSSL has its own interface, they also have a compatibility interface matching OpenSSL, so a transition would be easy.
  • You may benefit from additional progressive ciphers such as ChaCha20, Curve25519, NTRU, and Blake2b.
  • wolfSSL can be used for free with the GPL license option or used with commercial license and they offer paid support.
If you have a need for use of wolfSSL, please let us know. We can offer to use CURL functions using wolfSSL as SLL backend for your projects in Xojo and FileMaker.

Together with wolfSSL, we can offer customization to CURL library itself. We corodinate with Daniel Stenberg from wolfSSL to get changes made for you in CURL and then integrate those into our plugin functionality to get you the features you need the most.

See also wolfSSL vs. OpenSSL and CURL at wolfSSL.

Please contact us if you are interested in some special CURL modifications or use of wolfSSL and related products in FileMaker or Xojo.

Using Sharing Services in MacOS with FileMaker


With next MBS FileMaker Plugin (already in 10.3pr7 to try), you are able to trigger the sharing services in macOS from FileMaker. You can pass images, URLs, styled text and native file paths to various services. Not just one value, but several, e.g.

  • Send text and image to Messages
  • Send files, text, images, URLs, subject and recipients to Apple Mail
  • Send pictures to Photos application
  • Send text and URLs to reminders or notes applications
  • Send files via AirDrop to other users
  • Send URLs to reader list in Safari
  • Send PDF to Books application
  • Send picture to make it the desktop background

More services are available, for example when you install other applications.

(more)

Xojo like properties with parameters in C++


Xojo has a very unique feature: the assigns keyword. You use it to have two methods (getter and setter) with parameters work like a property. e.g. in the dictionary, you have those methods:

Value(Key as Variant) as Variant

and

Value(Key as Variant, assigns Value as Variant)

The first is a normal method returning the result. But the second one has an extra parameter, which is then filled with an assign operation. You write something like d.value(1) = 2, where the 2 is internally put as a parameter and internally calls Value(1,2).

To replicate this in C++, we got a way to replicate this by using a temporary object and two blocks for getter and setter. So the value() function in C++ returns the IntPropertyAssign object, which knows how to get or set the value. Then we can either assign a value, which calls to the operator= and calls setter. If you query the value, it calls through to the getter. (more)

Inside Delegates


You may have used a delegate in Xojo before. Technically a delegate is an object encapsulating a function pointer and if needed a reference to the object reference for a non-global method. As delegates are objects, you can store delegates in a dictionary or array and reference them later by name or index.

Although delegates are objects and they point to a class definition for a "Delegate" class, there is no such class known to the Xojo compiler. You can't use isA with Delegate or extend Delegate via extends or a plugin class extension. The only way to detect if an object or variant is a delegate object is to use introspection and check the full name there:

Dim aDelegate As ADelegate = AddressOf someFunction
Dim i As Introspection.TypeInfo = Introspection.GetType(aDelegate)

When you create a delegate, Xojo allocates an object for you. If you pass in a global method, it just reference the function pointer. But for a method from an object, the object is also referenced. Such a reference may be weak if you use weakAddressOf operator in Xojo. There is no built-in way to get the weak status or the target object, but there are feedback cases and we may be able to do something via plugin.

If you assign the delegate to the Ptr, you get the internal function pointer. This pointer doesn't point to the object, but to the actual Xojo function to be called through the Invoke method. If you assign one delegate to another delegate, that will work as long as the parameters are the same for both types.

We'd love to see Xojo Inc. add some properties to the Delegate class like "Target as Object", where you can see the target object. For weak delegates, a weak property may be great to see the status. And of course the target should become nil if the weak reference got invalid. Currently we can only handle that with catching NilObjectException when invoking them and then set delegate to nil to clear it. More great properties may be the parameters as string as well as a the delegate name itself.

To mitigate the issue for us, we add three functions GetDelegateParametersMBS, GetDelegateTargetMBS and GetDelegateWeakMBS. All take a variant with a delegate. They check whether this may be a delegate and if those, return you the parameter string, the target object or the weak flag. They do work in current and older Xojo version on macOS, Windows and Linux as we see, but may break with a future Xojo update. For weak references, the target is nil when the reference is broken.

See also a few feedback cases worth to support:
20844: Show more delegate information in the debugger
23305: Let Delegates to have properties to retrieve its content
26060: Detect weak status of a weak delegate

Firebug as Web Inspector for FileMaker on Windows


Did you know the old Firebug (ceased in 2017) can still be used in a web viewer in FileMaker on Windows?

We got it to work here for some development:



Allows to open a console, do some inspection in DOM tree and CSS rules. It even allows you to select object in the html page with mouse to inspect. And can optionally run in a separate window.

But sadly it is long outdated, so may not know latest JavaScript tricks or have some bugs. And doesn't work with more than 1x resolution of screen as far as I see. But otherwise may be a help here to debug JavaScript with IE 11 within FileMaker's web viewer. For installation in FileMaker, you can run the JavaScript to initialize via WebView.RunJavaScript via our plugin.

Older blog entries:

2020-06-28 Vier Monate bis zur Deutschen FileMaker Konferenz 2020 in Malbun
2020-06-28 MBS FileMaker Plugin, version 10.3pr7
2020-06-28 MBS Xojo Plugins, version 20.3pr7
2020-06-26 FileMaker Magazin - MBS Artikel
2020-06-25 Windows Photos Acquire
2020-06-25 MBS Workshop in Malbun bei der FileMaker Konferenz
2020-06-25 MBS Xojo Plugins, version 20.3pr6
2020-06-25 MBS FileMaker Plugin, version 10.3pr6
2020-06-25 MBS and OmegaBundle 2020
2020-06-24 Apple Silicon
2020-06-21 Search shortcut for Script Workspace
2020-06-21 Ten months till Xojo.Connect 2021 in London
2020-06-20 MBS Xojo Plugins, version 20.3pr5
2020-06-20 MBS FileMaker Plugin, version 10.3pr5
2020-06-20 Moved to macOS Catalina
2020-06-19 ChartDirector PDF Output
2020-06-17 Convert office documents to PDF with LibreOffice
2020-06-17 Set initial file for FileMaker 19 by script
2020-06-16 MBS Xojo Plugins, version 20.3pr4
2020-06-16 MBS FileMaker Plugin, version 10.3pr4

Archives

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