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.
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.
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.
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.
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.
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.
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.
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.
PS: Feedback case 38824.
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.