Tip of day: Save Xojo report to PDF

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

Notes from the Xojo Keynote

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

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

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

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

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

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

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

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

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

MBS Releases the MBS Xojo AudioPlayer Kit in version 1.0

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

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

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

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

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

MBS Xojo / Real Studio Plugins, version 15.1pr6

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

REALbasic and Real Studio still supported

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

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

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

FileMaker and Xojo Meetings for Munich and Nuremberg

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

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

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

MBS Xojo / Real Studio Plugins, version 15.1pr5

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

MBS Xojo / Real Studio Plugins, version 15.1pr4

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

Multiple file selection for WebViewer/HTMLViewer

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

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

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

Bug of the day: Not enough arguments

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

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

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

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

PS: Feedback case 38824.

Tip of the day: MySQL Error 1213

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

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

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


Jul 2024
Jun 2024
May 2024
Apr 2024
Mar 2024
Feb 2024
Jan 2024
Dec 2023
Nov 2023
Oct 2023
Sep 2023
Aug 2023
Jul 2023
Jun 2023
May 2023
Apr 2023
Mar 2023
Feb 2023
Jan 2023
Dec 2022
Nov 2022
Oct 2022
Sep 2022
Aug 2022
Jul 2022
Jun 2022
May 2022
Apr 2022
Mar 2022
Feb 2022
Jan 2022
Dec 2021
Nov 2021
Oct 2021
Sep 2021
Aug 2021
Jul 2021
Jun 2021
May 2021
Apr 2021
Mar 2021
Feb 2021
Jan 2021
Dec 2020
Nov 2020
Oct 2020
Sep 2020
Aug 2020
Jul 2020
Jun 2020
May 2020
Apr 2020
Mar 2020
Feb 2020
Jan 2020
Dec 2019
Nov 2019
Oct 2019
Sep 2019
Aug 2019
Jul 2019
Jun 2019
May 2019
Apr 2019
Mar 2019
Feb 2019
Jan 2019
Dec 2018
Nov 2018
Oct 2018
Sep 2018
Aug 2018
Jul 2018
Jun 2018
May 2018
Apr 2018
Mar 2018
Feb 2018
Jan 2018
Dec 2017
Nov 2017
Oct 2017
Sep 2017
Aug 2017
Jul 2017
Jun 2017
May 2017
Apr 2017
Mar 2017
Feb 2017
Jan 2017
Dec 2016
Nov 2016
Oct 2016
Sep 2016
Aug 2016
Jul 2016
Jun 2016
May 2016
Apr 2016
Mar 2016
Feb 2016
Jan 2016
Dec 2015
Nov 2015
Oct 2015
Sep 2015
Aug 2015
Jul 2015
Jun 2015
May 2015
Apr 2015
Mar 2015
Feb 2015
Jan 2015
Dec 2014
Nov 2014
Oct 2014
Sep 2014
Aug 2014
Jul 2014
Jun 2014
May 2014
Apr 2014
Mar 2014
Feb 2014
Jan 2014
Dec 2013
Nov 2013
Oct 2013
Sep 2013
Aug 2013
Jul 2013
Jun 2013
May 2013
Apr 2013
Mar 2013
Feb 2013
Jan 2013
Dec 2012
Nov 2012
Oct 2012
Sep 2012
Aug 2012
Jul 2012
Jun 2012
May 2012
Apr 2012
Mar 2012
Feb 2012
Jan 2012
Dec 2011
Nov 2011
Oct 2011
Sep 2011
Aug 2011
Jul 2011
Jun 2011
May 2011
Apr 2011
Mar 2011
Feb 2011
Jan 2011
Dec 2010
Nov 2010
Oct 2010
Sep 2010
Aug 2010
Jul 2010
Jun 2010
May 2010
Apr 2010
Mar 2010
Feb 2010
Jan 2010
Dec 2009
Nov 2009
Oct 2009
Sep 2009
Aug 2009
Jul 2009
Apr 2009
Mar 2009
Feb 2009
Dec 2008
Nov 2008
Oct 2008
Aug 2008
May 2008
Apr 2008
Mar 2008
Feb 2008