Image Zoom in Container


You remember my blog post Interactive FileMaker Containers are Webviewers?

Today we had more fun with images:



As you see we can zoom in for images in interactive containers using JavaScript and our WebView.RunJavaScript function. And of course we can center the zoomed image or scroll to any position.

Here the function call to switch width and height of the image to nature size:

MBS("WebView.RunJavaScript""ImageContainer";

 

// get image into variable

"img = document.getElementsByTagName('img')[0];" &

 

// remove CSS

"img.style = '';" &

 

// set width and height to 500px

"img.width = img.naturalWidth;" &

"img.height = img.naturalHeight;" )

And to scroll in the center position.

MBS("WebView.RunJavaScript""ImageContainer";

 

"document.body.scrollLeft = (document.body.scrollWidth - window.innerWidth)/2;" &

"document.body.scrollTop = (document.body.scrollHeight - window.innerHeight)/2;") 

This example will be included with next prerelease. Please do not hestiate to contact me for questions or to get a copy by email.


Xojo Developer Meeting for Utrecht


As I come to Utrecht (Netherlands), I plan a Xojo Developer dinner meeting there:

Date: 10th March 2017
Time: probably 18:00 to 22:00 o'clock, so you can come later or leave earlier.
Where: Somewhere in/near Utrecht, suggestions welcome.
Cost: Your own food and beverage

If you are interested, please let me know.
Topics may include news for MBS Plugins, Xojo conferences and latest Xojo release.

If you are interested in FileMaker, you can join the MBS FileMaker Plugin Training day in Utrecht

FileMaker Magazin 1/2017


Die neue Ausgabe vom FileMaker Magazin ist da. Im 143. Heft erwartet Sie:
  • Plugin-Installation
    Wie man FileMaker Plugins richtig installiert | Christian Schmitz
  • Wer Backups macht, ist nicht feige, sondern klug
    Automatische Backups mit Historie in FileMaker | Markus Schall
  • Schnell, schneller, FMPerception
    Ein neues Analys-Tool für FileMaker | Jörg Köster
  • Beezwax InspectorPro 6
    Wieso ist ein Analysewerkzeug für FileMaker Datenbanken hilfreich? | Thomas Hirt
  • Per Shellscript scannen
    Dokumentenerfassung ohne Plugin | Gunnar Wehrhahn
  • Portale im Eingabemodus
    Eine einfache Möglichkeit zur Dateneingabe | Rudolf Lehn
  • Erstellen einer einfachen Anwendung mit FileMaker
    Ein Volltextsucharchiv für das FileMaker Magazin und Zeitschriften im PDF-Format, Teil 5 | Burkhard Quenzler
  • Das Problem der Scheinselbstständigkeit
    Vorsicht Falle! | Christoph Kluss
  • Das klingt irgendwie logisch
    Ein Funktionensystem für Logikoperationen auf Bitniveau, Teil 1 | Erich Schmidt
  • FMM Titelwahl 2016
    Favorit gesucht | FMM Redaktion
  • Leserbrief
    Zur Buchbesprechung FMM_201606 „FileMaker 15 für alles und jeden“ | Rainer Maschke
  • Ein Samstagmorgen im Verlag
    Stelldichein bei Sekt & Schnittchen | FMM Redaktion
Zudem Neuigkeiten, Kleinanzeigen, aktuelle Versionen, Adressen, Stammtische und vieles mehr.
Ein Abo sei allen FileMaker Anwendern mit Deutschkenntnissen empfohlen :-)

FileMaker DevCon 2017 with MBS booth




See you in Phoenix Arizona for the FileMaker Developer Conference, 24th to 27th July 2017.
MBS will be present with a booth in the vendor area. If you like to join the conference, be sure to buy your ticket till 28th February for the best price.

Adding CURLN* classes to MBS Xojo Plugins


As you may know we have already two CURL variants. First, the one to use your custom CURL library or the system provided one on Mac or Linux. Second, the CURLS* classes using a statically linked curl library with OpenSSL and SSH2 libraries. Now we a third option with CURLN* classes. Those use a built-in CURL library with the native SSL on Mac and Windows.
Here is a table with the built-in libraries:

PlatformCURLCURLSCURLN
Mac 64-bit-OpenSSLDarwinSSL
Mac 32-bit-OpenSSLDarwinSSL
Mac 32-bit PPC-OpenSSL-
Windows 32-bit-OpenSSLWinSSL
Windows 64-bit-OpenSSLWinSSL
Linux 32-bit-OpenSSL-
Linux 64-bit-OpenSSL-
Linux 32-bit ARM-OpenSSL-

For all variants you can always optionally load system or custom libraries. It's just about what is included in the plugin as default option.

Native SSL on Mac requires OS X 10.8 or newer.

If no library was loaded and you run the CURL class constructor, we will try to load the system library. That works fine on Linux and Mac.

So now it's your decision what you want to use:
The default for examples will stay with CURLSMBS as the built-in libraries provide cross platform the same experience. If you need to do native SSL, you may want to try CURLNMBS and if you plan to use your own custom CURL libraries, you can use CURLMBS.

A Calendar running in WebViewer in FileMaker


On a recent trip to Switzerland I had a training day and spontaneously we created an example project using a JavaScript based calendar in a WebViewer.
We use a lot of MBS Plugin functions to initialize this and run the JavaScript.

Calendar in FileMaker with MBS Plugin

While we will include it with next plugins in examples, this is only half done. So take the chance to learn and see how you can call JavaScript and catch events.

Next trainings:

XDC 2016 videos are here!


Everyone can now watch those 34 sessions from last year's XDC in Houston, Texas.

If you attended, you can simply login on xojo.com and find the videos in the navigation bar.

If not, you can purchase them for a special introductory price of $349, buy now.

Session list:
  • XDC Keynote
  • About the Xojo Compiler, Joe Ranieri
  • Advanced Git Features and Methodologies, Justin Elliott
  • All About iOS, Travis Hill
  • Ask the Xojo Engineers
  • Build and Consume REST WebServices with Xojo, Pat Delaney
  • Database Driven Apps, Hal Gumbert
  • Database Design Patterns and Anti-Patterns, Craig Boyd
  • Desktop Developer’s Guide to Making iOS Apps, Paul Lefebvre
  • Eliminating Common Database Issues, Bob Keeney
  • Quick, Good and Cheap: Removing Human Error in the Xojo Application Build Process, Greg O’Lone
  • Fun topics with Introspection, Norman Palardy
  • Grow Your Software Company: Create Value, Get Sales, Paul Levine
  • Implementing Self-Updating Apps with Kaju, Kem Tekinay
  • It Rhymes with Mojo, Mark Strickland
  • Load Balancing and Other Techniques for Enterprise Web Apps, John Joyce
  • Managing Your Projects (and Yourself) to Success, Susan Fennema
  • Mastering PostgreSQL, Dirk Cleenwerck
  • Modernizing Your Xojo Apps, Paul Lefebvre
  • Panel Discussion - Running a Software Business - Geoff Perlman, Paul Levine, Fred Roller
  • Panel Discussion - Xojo Consulting - Paul Lefebvre, Bob Keeney, Tim Dietrich, Hal Gumbert
  • Powering Apple TV Apps With Xojo, Tim Dietrich
  • Raspberry Pi: The Ultimate Gadget, Paul Lefebvre
  • Responsive Design for Desktop and Web, Michel Bujardet
  • Snippets: A Collection of Tools and Code to Enhance Productivity, Bob Gordon
  • Supercharge Your Windows and Linux Apps, William Yu
  • Supporting Retina and HiDPI in Your Applications, Greg O'Lone
  • Test Driven Development, Jeremy Cowgar
  • The Dirty Dozen: Connecting to Nearly Any Database with the MBS SQL Plugin, Christian Schmitz
  • The Xojo Framework, Joe Ranieri & Travis Hill
  • Unit Testing from Soup to Nuts in Xojo, Philippe Casgrain
  • Xojo Reporting on Steroids, Bob Keeney
  • Xojo's Role in the API Economy, Tim Dietrich
  • XojoScript: Xojo's Coolest Feature, Marc Zeedar
If you like to attend a conference, we have two great options for you:

in 2017: the MBS Xojo Conference in Berlin, Germany from 4th to 5th May 2017.
in 2018: the Xojo Developer Conference 2018 in Denver, USA from 25th to 27th April 2018.

MBS Xojo Plugins, version 17.1pr3


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

MBS FileMaker Plugin, version 7.1pr3


New in this prerelease of the 7.1 MBS FileMaker Plugin: Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder. PS: Due to an oversight, this pr3 plugin has 2 as version number.

Differences between CURLMBS and CURLSMBS classes


For years now we have two classes for CURL in your MBS Xojo Plugins:

CURLS (with S) which uses our statically linked CURL library. And it includes SSH and SSL libraries, so it has no dependencies. You can use the plugin and no other DLLs are required.
CURL (without S) does the same, except that it comes without a built in library. You can load whatever CURL library you want. For example you can use the one which comes with macOS or Linux. Or you provide your own dll/dylib/so files. Those versions may be with or without SSH or other features.

For 7.1 plugins we made sure both sets of classes have the same features and match in classes. So we got FileInfo class for CURL part, too. And the CURLEmailMBS class used with CURLS part is now named CURLSEmailMBS. That is due the CURLEmailMBS is now related to CURLMBS. Please update the class name in your code.

If you are interested to use native SSL libraries on Mac or Windows and ditch OpenSSL, we have later special CURL Libraries for you. They work well with CURL plugin, but you have to include them with your application and load them at runtime.

Create PDF with Embedded Links in FileMaker using MBS Plugin


One of our plugin users, Kevin Frank, wrote a nice article on his filemakerhacks blog about using embedded links in a PDF document.

With FileMaker you can create PDFs from your records. Using DynaPDF functions in MBS Plugin you can merge several PDFs, but how to do a table of contents page?
Kevin explains how he uses our plugin to add the clickable links on the first page with the list of topics, so each click jumps to the right page.

Read yourself here: filemakerhacks.com/2017/02/21/pdf-with-embedded-links/

Thanks for sharing and for asking for more functions. You need plugin version 7.0 or later for the example.

Using Apple's Global Service Exchange web service in FileMaker


Quite a few Apple shops use FileMaker and/or Xojo for their development of in-house tools. A common request is to use Apple's webservices to query warranty status. So today I want to show some scripts on how to do this. First of course you have to ask Apple for a GSX login which may require some paperwork. Next you need to white list your static IP for their webservice and get the credentials.
 
You request a certificate from Apple, so you generate a private key. The tricky key is to copy the private key with the certificate into one pem file. This pem file is than used wiht our script. Also please download a standard cacert.pem file with root certificates.
The first script logs into the webservice from Apple. We pass the user id and service account id in the login request. 
 
#Parameters

Set Variable [$path; Value:"/path to files/"]

Set Variable [$userid; Value:"xxx"]

Set Variable [$serviceAccountNo; Value:"yyy"]

Set Variable [$PrivateKeyPassword; Value:"secret password"]

#Build the XML

Set Variable [$xml; Value:GSX::Login XML Template]

Set Variable [$xml; Value:Substitute($xml; "$userId$"; MBS("Text.EncodeToXML"; $userid))]

Set Variable [$xml; Value:Substitute($xml; "$serviceAccountNo$"; MBS("Text.EncodeToXML"; $serviceAccountNo))]

#Start curl session

Set Variable [$curl; Value:MBS("CURL.New")]

Set Variable [$r; Value:MBS("CURL.SetOptionURL";$curl; "https://gsxapi.apple.com:443/gsx-ws/services/emea/asp")]

#We use a PEM file with private key and our certificate

Set Variable [$r; Value:MBS("CURL.SetOptionSSLCertType"; $curl; "PEM")]

Set Variable [$r; Value:MBS("CURL.SetOptionKeyPassword"; $curl; $PrivateKeyPassword)]

Set Variable [$r; Value:MBS("CURL.SetOptionSSLCert"; $curl; $path & "your.pem")]

#and the usual root certificates

Set Variable [$r; Value:MBS("CURL.SetOptionCAINFO"; $curl; $path & "cacert.pem")]

#Use TLS v.1.2

Set Variable [$r; Value:MBS("CURL.SetOptionSSLVersion"; $curl; 6) // TLS v1.2]

#Wait for 10 seconds

Set Variable [$r; Value:MBS("CURL.SetOptionTimeOut"; $curl; 10)]

#Specify content type and SOAP Action for webservice

Set Variable [$r; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml; charset=UTF-8"; "SOAPAction: \"urn:authenticate\"")]

#Pass XML to CURL

Set Variable [$r; Value:MBS("CURL.SetOptionPostFields"; $curl; $xml)]

#Run the request

Set Variable [$r; Value:MBS("CURL.Perform"; $curl)]

#Check result by storing result, debug log and output data in fields

Set Variable [$httpResponse; Value:MBS( "CURL.GetResponseCode"; $curl )]

Set Field [GSX::CURL Result; $r]

Set Field [GSX::CURL Input; $xml]

Set Field [GSX::CURL Debug; MBS("CURL.GetDebugAsText"; $curl; "UTF8")]

Set Field [GSX::CURL Output; MBS("CURL.GetResultAsText"; $curl; "UTF8")]

If [$r = "OK" and $httpResponse = 200]

#on success, get our session id

Set Field [GSX::SessionID; MBS("Text.FindBetween"; GSX::CURL Output; "<userSessionId>"; "</userSessionId>")]

End If

#always clean up

Set Variable [$r; Value:MBS("CURL.Cleanup")]


(more)

Workshop zum MBS FileMaker Plugin @ Denkform


For our German speaking clients we have a workshop day: In Zusammenarbeit mit der DenkForm GmbH bieten wir eine Schulung zum MBS Plugin an. Am 2. März 2017 (und 7. Dezember 2017) können Sie in Hofheim am Taunus an einer eintägigen Schulung teilnehmen. Lernen Sie die über 4400 Funktionen einmal näher kennen und wie Sie sie effektiv einsetzen. Sammeln Sie Ideen und verbessern Sie ihre FileMaker Lösungen durch den Einsatz unseres Plugins. Das Monkeybread Software Plugin für FileMaker stellt eine vielseitige Erweiterung der eigenen Datenbank dar. Der Kurs bietet nicht nur einen tiefgreifenden Überblick in die Benutzung und Entwicklung, sondern bietet auch die Chance das Plugin günstiger zu erstehen.
  • Einführung in das MBS Plugin
  • Überblick über die Funktionsbereiche
  • Neues im MBS Plugin dieses Jahr
  • Rundgang durch ausgewählte Beispiele
  • Gemeinsames Implementieren von Plugin Funktionen in eine Datenbank:
  • Upload/Download mit CURL auf einen HTTP/FTP Server
  • Ausfüllen eines Formulares auf einer Webseite
  • Bilder bearbeiten
  • PDF Verarbeitung
  • Druckerfunktionen
  • Adressbuch und Kontakte abfragen bei Mac OS X.
  • Fragen und Antworten
Die Teilnahme kostet 99 Euro inkl. MWSt. und Verpflegung. Details und Anmeldung bei der Denkform. Im Anschluss geht es noch zur Pizzeria zum FileMaker Stammtisch Rhein-Main. An jedem ersten Donnerstag im Monat findet ab 19 Uhr der "FileMaker Stammtisch Rhein-Main" statt, zu dem jeder herzlichst eingeladen ist. PS: Die Schulung findet statt.

Dash help archives for Xojo and FileMaker


For browsing help files, the Dash application is very useful on Mac and iOS.

Here you can click to launch Dash and install our plugin help:
MBS Xojo Plugin and MBS FileMaker Plugin

You can download the archives manually on our website:
FileMaker and Xojo (Real Studio).

You can also add Xojo documentation itself to your dash set, see download in preferences dialog.
For FileMaker you find the docsets for v15 here: FileMaker Dash Docsets

Feedback is welcome.

Worldwide first curl conference in Germany, March 2017


On the weekend of March 18-19, 2017, the first ever curl conference is taking place is Nuremberg, Germany.

Users, developers, binding authors, application authors, curl maintainers, libcurl hackers and other people with a curl interest are welcome!

I will be there and finally meet the curl people. I've been using curl for various projects including Xojo and FileMaker plugins for over 10 years.
Do you also come?

Dialogs with more buttons in FileMaker


Today I presented my MBS Plugin and showed with a lot of other things my Dialog functions. Someone asked how many buttons we can have and they had the wish to show more than three:

So for next plugin version, we can have up to 10 buttons.
Mac and Windows. Want to try? Just email me.

MBS Xojo Plugins, version 17.1pr2


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

MBS FileMaker Plugin, version 7.1pr2


New in this prerelease of the 7.1 MBS FileMaker Plugin:
  • Updated DynaPDF to version 4.0.8.21.
  • Added DPI support to various functions returning images.
  • Updated SQLite to 3.17.0 prerelease version.
  • Fixed a problem in Audit which caused a crash if no FieldID was found.
  • Changed Printer.Print to make printer name optional.
Download at monkeybreadsoftware.de/filemaker/files/Prerelease/ or ask for being added to the dropbox shared folder.

Macwelt TV Folgen rund um Xojo


Vor fast zehn Jahren habe ich für die Macwelt ein paar Videos gemacht für Macwelt TV zu REALbasic:



Die Anleitungen funktionieren wunderbar mit dem aktuellen Xojo. Natürlich sieht Xojo etwas anders aus als REALbasic früher:
  • Alle Events müssen Sie selber hinzufügen.
  • Das StaticText Steuerelement heißt jetzt Label.
  • Alle Konstruktoren heißen Constructor und nicht mehr wie die Klasse.
Aber die Spiele kann man beide noch wunderbar nach programmieren und etwas Spaß mit dem Ergebnis haben!

Alle Videos finden Sie auf YouTube. Ein paar Kopieren liegen auch hier zum Download.

FileMaker Custom function to query a value from other table or file


Today I have a custom function for FileMaker for you. It allows you to query any value in your databases by referring to the record by a field and it's value.
This can avoid complex relations if you just run a little query:

// Custom Function QueryValue

//

// Parameter:

// theFileName: the file name of the database. Empty for current.

// theFieldToQuery: the field name we want to query

// theFieldToMatch: The field to look for (primary field). Can be RowID for record ID.

// theValueToMatch: The value of the match field. Must match in data type

// 

 

Let ( [

// put quotes around field names unless it is RowID

theFieldToMatch = If(theFieldToMatch = "RowID"; theFieldToMatch; "\"" & theFieldToMatch & "\"");

theFieldToQuery = If(theFieldToQuery = "RowID"; theFieldToQuery; "\"" & theFieldToQuery & "\"");

 

// put quotes around the table name

theTable =  "\"" & theTable & "\"";

 

// Now run query

SQLRef = MBS( "FM.SQL.Execute"; theFilename; "SELECT " & theFieldToQuery & " FROM " & theTable & " WHERE " & theFieldToMatch & " = ?"; theValueToSearch);

 

// if no error, get first value

result = If(MBS("IsError"); SQLRef; MBS( "FM.SQL.Field"; SQLRef; 0; 0 ));

 

// if no error, release the recordset from memory

r = If(MBS("IsError"); ""; MBS( "FM.SQL.Release"; SQLRef ))

 

// return result

] ; result )

By using FM.SQL.Field, we get the field in it's original data type. So a container stays a container and a number stays a number. Converting to text would destroy them and cause problems. For example you can use this query to show a picture (container field) of a user if you know the user's login name for the query:

Set Field [Test::Picture; QueryValue(Get(FileName); "Picture"; "PersonID"; $PersonID) ] 

The advantage is that you don't need a relation and you can query it at any time anywhere.  

A special field name is RowID which allows you to query with using record ID. This is internal FileMaker number for a record which you query by Get(RecordID).

Works with current MBS Plugin and FileMaker with FileMaker 11 and newer.


MDI Window Background in Xojo


Recently we had the question whether we can draw into a MDI parent window.
The answer for all your Xojo or Real Studio projects is yes:
MDI Window with background color

We can catch the paint event with our WinNotificationMBS and draw something nice there.
For example a fixed color or any picture you like.

This will come with next prerelease or if you like to try today, just email me.

Tip of the day: AES 256 CBC on iOS for Xojo


Today I made an example for a client to show how to do AES 256bit CBC encryption on iOS using CommonCrypto library and the MBS Xojo Encryption Kit.

Our Encryption Kit wraps the CommonCrypto framework from Apple which is available for iOS (2.0 or newer) and macOS (10.4 or newer). It also wraps zlib library to compress and decompress data.

The compression and encryption functions are than used in a database connector. That's a proxy to connect to a database on a server and serialize the requests and record sets to send them through the network.

So here is some sample code for AES 256 CBC:

dim MyVal as text = "If you can read this text then process of encryption and decryption is working well." dim mbMyVal as xojo.Core.MemoryBlock = xojo.core.TextEncoding.utf8.ConvertTextToData(MyVal) dim MyPwd as text = "Passphrase goes here" dim mbMyPwd as xojo.Core.MemoryBlock = CommonCryptoMB.Hash(CommonCryptoMB.Hashes.SHA256,MyPwd) System.DebugLog "Test value and passphrase created." dim iv as xojo.Core.MemoryBlock dim cryptor as new CommonCryptorMB(CommonCryptoMB.CryptoOperation.Encrypt, CommonCryptoMB.CryptoMode.kCCModeCBC, _ CommonCryptoMB.CryptoAlgorithm.AES, CommonCryptoMB.CryptoPadding.PKCS7, mbMyPwd, iv) dim enData1 as xojo.Core.MemoryBlock = Cryptor.Update(mbMyVal) dim enData2 as xojo.Core.MemoryBlock = cryptor.Final1 dim enData as new xojo.Core.MutableMemoryBlock(enData1) enData.Append enData2 System.DebugLog "Encrypted data value created." System.DebugLog "Encrypted data: '" + CommonCryptoMB.EncodeHex(enData) + "'" dim decryptor as new CommonCryptorMB(CommonCryptoMB.CryptoOperation.Decrypt, CommonCryptoMB.CryptoMode.kCCModeCBC, _ CommonCryptoMB.CryptoAlgorithm.AES, CommonCryptoMB.CryptoPadding.PKCS7, mbMyPwd, iv) dim result1 as xojo.Core.MemoryBlock = Cryptor.Update(enData) dim result2 as xojo.Core.MemoryBlock = cryptor.Final1 dim result as new xojo.Core.MutableMemoryBlock(result1) result.Append result2 System.DebugLog "Result: '" + xojo.core.TextEncoding.UTF8.ConvertDataToText(result) + "'"

The same code works fine on macOS. For cross platform encryption for Mac, Windows and Linux, I would recommend our CipherMBS class.

Tip of the day: Connect to MySQL and run a query


With MBS Plugins you can connect to various databases from Xojo and FileMaker.
As you may know we support Centura SQLBase, DB2, Firebird, Informix, InterBase, MariaDB, Microsoft Access, Microsoft SQL Server, MySQL, ODBC, Oracle Database Server, PostgreSQL, SQL Anywhere, SQLite, SQLCipher and Sybase. 
 
Here an example script for FileMaker using MySQL: 
 

#Start a new connection

Set Variable [$Connection; Value:MBS("SQL.NewConnection")]

#Tell plugin where MySQL library is (put it where you like)

Set Variable [$result; Value:MBS("SQL.SetConnectionOption"; $Connection; "MYSQL.LIBS"; "/Users/cs/Desktop/libmysqlclient.dylib")]

#Connect to a mysql database:

Set Variable [$result; Value:MBS("SQL.Connect"; $Connection; "192.168.11.51@Server_Config"; "user"; "password"; "MySQL")]

If [$result  ≠  "OK"]

#Connection failed

Show Custom Dialog ["Error: " & $result]

Set Variable [$result; Value:MBS("SQL.FreeConnection"; $Connection)]

Halt Script

Else

#Create a query:

Set Variable [$Command; Value:MBS("SQL.NewCommand"; $Connection; "SELECT * FROM Server_Config where ServerName=:Name")]

#If you use parameters, you can fill them here

Set Variable [$r; Value:MBS("SQL.SetParamAsText"; $Command; "Name"; "MacMini")]

#Execute it

Set Variable [$result; Value:MBS("SQL.Execute"; $Command)]

If [$result  ≠ "OK"]

Set Field [MySQL Query::Result; $result]

Show Custom Dialog ["Error: " & $result]

Else

Set Variable [$lines; Value:""]

Set Variable [$fieldcount; Value:MBS("SQL.FieldCount"; $command)]

Loop

#call FetchNext to get the next record

Set Variable [$result; Value:MBS("SQL.FetchNext"; $Command)]

Exit Loop If [$result  ≠ 1]

Set Variable [$line; Value:""]

Set Variable [$i; Value:1]

Loop

#We query field names and values to show them later

Set Variable [$v; Value:MBS("SQL.GetFieldAsText"; $command; $i)]

Set Variable [$n; Value:MBS("SQL.GetFieldName"; $command; $i)]

Set Variable [$line; Value:$line &  $n & ": " & $v & ¶]

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

Exit Loop If [$i > $fieldCount]

End Loop

Set Variable [$lines; Value:$lines & ($line & ¶)]

End Loop

Set Variable [$lines; Value:$lines & ¶]

Show Custom Dialog ["Result from Query:"; $lines]

End If

#Cleanup

Set Variable [$result2; Value:MBS("SQL.FreeCommand"; $Command)]

End If

Set Variable [$result2; Value:MBS("SQL.FreeConnection"; $Connection)]

 
As you notice some database types like MySQL, PostgreSQL, DB2, Oracle, Firebird and others need a client library. We point the plugin to load the client library which must match the bit number from FileMaker or Xojo. Once we are connected, we can run several queries over the connnection and usually keep it open while the application does its work.

English MBS Plugin training in Netherlands


The people from FileMaker Developers Nederland organize regularly FileMaker meetings in Netherlands. They asked me to offer some insight into the MBS Plugin, so we invite to an MBS Event for Saturday 11th March 2017 to de Schakel, Utrecht:

Wat zou FileMaker zijn zonder de plugin van Monkeybread Software? Deze plugin biedt FileMaker ongekende uitbreidingsmogelijkheden voor een aanvaardbare prijs.

De dag wordt ingeleid en begeleid door Christian Schmitz, de maker van de plugin. Zijn nieuwe versie 7 omvat Inmiddels ruim 4400 functies verdeeld over 169 groepen. De functies zijn grotendeels Windows, Mac en FM Server compatible.

Tijdens de dag gaan we aan de slag met CURL (o.a. email, ftp), file-manipulaties, Restful API, SQL en functies die grappig en handig zijn.

Daarnaast zal Christian de verbeelding stimuleren door een vooruitblik te geven op nieuwe functies. Uiteraard is er gelegenheid voor vragen.

Voor een lunch wordt gezorgd, daarna is een borrel op eigen kosten.

Het evenement vindt plaats in Vleuten nabij Utrecht en is goed bereikbaar met auto (gratis parkeren) en openbaar vervoer. Om de onkosten te dekken vragen we voor deze Meetup €50,= excl BTW.

Deelnemers moeten eigen laptop meenemen en zelf zorgen voor installatie van de laatste versie van de MBS Plugin.

in English:

Where would FileMaker be without the plugin from MonkeyBread Software? This plugin offers an unprecedented array of functions for a very reasonable price.
Our MeetUp event will start with an introduction by Christian Schmitz, who created the plugin. The new version 7 offers an impressive 4400 functions, in 169 groups. Many of them are cross-platform and even support FileMaker Server.

During the day, we will get our hands on CURL (including e-mail communication, FTP), file and folder manipulation, use of the plugin for RESTful programming and SQL, among other things.
Christian will be around to answer questions and we hope he will also gives us a glimpse of future developments as well.

The Event will be held in Vleuten near Utrecht. The location is easily accessible by car and public transport. To cover the expenses, we charge a fee of €50,- pp. excl. VAT, which includes the lunch.
Participants are invited to bring their won laptop and take care of the installation of latest version of the plugin themselves.

This is an English speaking event and I hope to see a lot of people from Netherlands or areas around. Sign up on Meetup or contact the organizer Hans Erik Hazelhorst.

MBS Xojo / Real Studio Plugins, version 17.1pr1


New in this prerelease of the 17.1 plugins:
  • Updated DynaPDF to version 4.0.8.20.
  • Added NSTableDataSourceMBS sortDescriptorsDidChange event.
  • Added orderOut and orderFront to NSMediaLibraryBrowserControllerMBS class.
  • Added LibraryLoaded property to DB2MBS, InformixMBS, MySQLMBS, PostgreSQLAPIMBS and SQLite3MBS.
  • Fixed InternalPostgreSQLLibraryMBS, so it works again on Linux.
  • Added CFObjectMBS.EncodedData.
  • Fixed issue with overwritten memory in Picture.SteganographyMBS function.
  • Added JPEGExporterMBS.ExportGray with memoryblock for pixel data.
  • Added workaround to CoreLocation plugin to avoid bugs in 32-bit Apple frameworks.
  • Fixed an issue with private API for Mac App Store in NSEPSImageMBS.
  • Removed RegisterCustomQTDataHandlerMBS and OpenMovieWithCustomDataHandlerMBS.
  • Removed AppleTalk properties for SystemConfigurationMBS as they are no longer available in macOS 10.12.
  • Added options to TiffPictureMBS.Scanlines to read only every nth scanline.
  • Added WindowsProcessMBS class, a shell class replacement for Windows.
  • Added CGImageMBS.PictureScaled to get picture scaled down faster.
  • Added support for CEF3 beside CEF1.
  • Fixed NetworkInterfaceMBS.MAC to no longer have a LF character on the end.
  • Fixed HIDAPIMBS to better find libudev.
  • Added AppendTableRow and DuplicateTableRow to WordFileMBS class.
  • Removed CUPSMBS.GetPPD function.
  • Fixed an issue with internal message window for Windows.
  • Changed plugin to show less registration warning dialogs in trial mode.
  • Fixed issue with LDAPMBS.Bind not working correctly on Windows for all auth methods.
Download: monkeybreadsoftware.de/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS FileMaker Plugin, version 7.1pr1


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

Running command lines tools on Windows


The last days, I spend some time on a class for Windows to run a process with access to the stdin/stdout/stderr channels. I know the Xojo Shell class can do that, but I wanted a bit more Windows specific commands here.
So we got a new WindowsProcessMBS class to run a process on Windows. You can run GUI or command line applications and specify a couple of options. The plugin will automatically connect stdin, stdout and stderror handles, so the plugin can read the output of the tool and pass data for input. The class can be used synchronously or with events, whatever you prefer. Here an example:
// run command dim w as new WindowsProcessMBS w.CommandLine = "cmd /c dir" w.CurrentDirectory = "C:" if not w.run then MsgBox w.LastErrorMessage Return end if // wait while w.Running app.YieldToNextThread wend // show result dim a as integer = w.AvailableBytesOutput dim r as string = w.ReadOutput(a) MsgBox r
We already got features to specify command line and environment variables. You can read or just peek in the output of the launched application. We can even terminate it or just wait for it to quit. This class will be available in 17.1pr1 plugins soon. If you want to test on the weekend, send me an email.

Archives

Nov 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