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 AsNew GasDataSet
Dim ps AsNew PrinterSetup
Dim rpt AsNew GasPricesReport 'thisisareporteditorprojectitem'settheresolutionto300DPIforprinting
ps.MaxHorizontalResolution = 300
ps.MaxVerticalResolution = 300//changePrinterSetuptopointtoprinttoPDFfiledim s asnew NSPrintInfoMBS
s.SetupString = ps.SetupString
s.SetSaveDestination SpecialFolder.Desktop.Child("test.pdf")
ps.SetupString = s.SetupString
//nowprintreportDim g As Graphics = OpenPrinter(ps)
If g <> NilThenIf rpt.Run( ds, ps ) Then'ifthereportrunssuccessfully
rpt.Document.Print(g)
EndIfEndIf
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.
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.
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!
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.
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.
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.
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.