Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE
Our Blog, Filemaker only, Xojo only, Archive (older)

Follow us on Twitter, Xing, LinkedIn or Facebook.

XDC Video Sale


Xojo Inc. is running a sale and offers older Xojo conference videos:

As we are getting closer to XDC 2019, new conference videos are on the horizon! We are now offering some great pricing on the XDC 2018 and 2016 videos! Between now and XDC (May 1, 2019), you can get the XDC 2016 video set for $75 and the 2018 video set for $99! Buy now!

If you like to attend a conference, there is a the bigger official Xojo Developer Conference in May 2019 in Miami and our European Xojo conference in Cologne in October 2019.

Fixing a broken time machine backup


If you see a dialog like this, your backup may be broken or just have a little problem with the disk image. So usually we try to repair it instead of starting over. This are the steps necessary:

First turn of backups and mount the Time Machine disk and check what the name of the disk and the sparse bundle inside is, so you can adjust the names. hdiutil will return the disk number, which must be used for the next two calls:

sudo su -
hdiutil attach -nomount -noverify -noautofsck /Volumes/DiskName/BackupName.sparsebundle
fsck_hfs -dfy /dev/diskXs2
hdiutil detach /dev/diskXs2

After fsck_hfs repaired the disk image on your time machine, you may need to remove the nouchg flag for the sparse bundle:

chflags -R nouchg /Volumes/DiskName/BackupName.sparsebundle

In the plist file inside the bundle, you may need to remove the decline date where the backup was marked broken:

<key>RecoveryBackupDeclinedDate</key>
<date>some-data</date>

And set the VerificationState back to zero:

<key>VerificationState</key>
<integer>0</integer>

If you did all the steps, you can enable backups again and let it continue with the same time machine sparse bundle.
We did those fixes a few time already and usually fsck reported just a minor problem.

MBS Xojo Plugins, version 19.1pr3


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

Connecting to PostgreSQL with SSL and client certificate file in Xojo


You can pass various options when connecting to PostgreSQL server with SQLDatabaseMBS or SQLConnectionMBS classes in our MBS Xojo SQL Plugin. This includes several SSL options. If ssl mode is require, the SSL encryption is required. But only if you provide local certificate chain and the mode verify-full, the chain of certificates is validated. So if someone puts in a proxy with their own certificate, your application would not connect.

So here a sample code about how to connect with a client side certificate, a private key and the root certificates to validate against: (more)

Move from REALSQLdatabase to SQLiteDatabase


While current SQLiteDatabase in Xojo 2018r4 uses SQLite 3.25.3, the old REALSQLdatabase is still version 3.7.14.1, about 6 years older. If you still have code with REALSQLdatabase, please move it to SQLiteDatabase. Or you move to SQLDatabaseMBS, which offers SQLite 3.27.1 currently with the recently added VACUUM INTO command.

Normally you just change the class names from REALSQLdatabase to SQLiteDatabase and RealSQLPreparedStatement to SQLitePreparedStatement. The older class sometimes added ROWID to the select statements to make edit/update/delete methods workable.

A few things SQLiteDatabase got over the six years:
  • SQLite got a backup API, so you can backup to a new SQLiteDatabase.
  • SQLite 3.25.0 got window functions
  • SQLite 3.24.0 got support for PostgreSQL-style UPSERT.
  • SQLite 3.18.0 got PRAGMA optimize command.
  • SQLite 3.15.0 got support for row values.
  • SQLite 3.9.0 got FTS 5 extension
  • Endless bug fixes including some that could corrupt the database.
  • Great performance improvements between
Finally a general tip. Please call SQLExecute "PRAGMA cache_size = 20000" early in app start to set a big enough cache size. If the tables or their indexes don't fit in memory, performance suffers.

MBS Xojo Plugins, version 19.1pr2


New in this prerelease of the 19.1 plugins:
  • Changed CarbonEventsIdleTimerMBS.available to be shared property.
  • Added CGImageSourceMBS.CreateThumbnailMT to create thumbnails threaded.
  • Added GMConvertMBS and GM16ConvertMBS classes.
  • Added HIDAPIDeviceMBS.WriteAsync method.
  • Added SQLErrorExceptionMBS.SQL property.
  • Added TiffPictureMBS.ScanlinesScaled function to scale down vertically on reading scanlines.
  • Added work around to NSColorSpaceMBS.File property to make it work better.
  • Changed UNNotification functions to return error on server.
  • Changed WebDownloadDelegateMBS and NSURLDownloadMBS classes to be thread safe.
  • Changes TiffPictureMBS.Scanlines and ScanlinesScaled to yield.
  • Fixed a problem with TiffPictureNBS.Scanlines crashing with too small buffer for some images.
  • Fixed crash with connecting to SQL Anywhere when creating connection failed. Now reports an error instead.
  • Fixed problem with UNNotification functions blocking plugin to initialize on Server. (from pr1)
  • Fixed TiffPictureNBS.Scanlines to correct parameters if RowsPerStrip > 1.
  • Removed OverlayMBS.WindowGroupHandle property.
  • Removed WindowGroupMBS class (Mac 32-bit Carbon only).
  • Updated DynaPDF to version 4.0.25.72.
  • Updated SQLAPI to 4.2.5b4.
  • Updated SQLIte to version 3.27.1.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

CGImageSourceMBS CreateThumbnailMT method for Xojo


Today a client had questions on how to get a lot of thumbnails calculated quickly in Xojo. We do have CGImageSourceMBS class to read various image files and use Apple's image decoders with hardware acceleration, but doing one after the other in Xojo for thousands of image files would still take a long time.

To speed things up, we made a few plugin functions to use preemptive threads to create the thumbnails. You run several Xojo threads and in each process image files and call one of the following methods:

CreateThumbnailMT(file as FolderItem, ImageIndex as integer = 0, Options as dictionary = nil) as CGImageMBS
CreateThumbnailMT(data as String, ImageIndex as integer = 0, Options as dictionary = nil) as CGImageMBS
CreateThumbnailMT(data as MemoryBlock, ImageIndex as integer = 0, Options as dictionary = nil) as CGImageMBS

The main work is done on a preemptive thread, so you can get a lot of CPU cores busy if needed. The returned CGImageMBS objects can be converted to Xojo pictures (Picture method), or you get png or jpeg image data with PNGData or JPEGData methods.

You can pass various options via dictionary to select the thumbnail size or decide whether you like to use thumbnails embedded in images.

Coming soon for next 19.1 prerelease. If you like to try earlier, please email us.

PS: We also add GMConvertMBS class to do the similar things cross platform. You can use it to scale down images for thumbnails with preemptive threads.

MBS Xojo Plugins, version 19.1pr1


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

More SceneKit for Xojo


For next MBS Xojo Plugins, we'll get a few new SceneKit classes for 3D graphics. Here a few screenshots from new examples:

(more)

Linux Icon Functions for Xojo


For next plugin prerelease, we add new LinuxIconMBS module to provide a few new functions to query icons.

The Icon function queries the picture for the icon based on a mime type, while SymbolicIcon queries the symbolic icon. The FileIcon function takes a folderitem and queries a picture for the icon. For some files, you can query a thumbnail with FileThumbnail function. You get back a path to the temporary file with the icon, in our case a png file.

Functions coming soon for MBS Xojo Linux Plugin 19.1.

Older Xojo versions


Not every project needs the newest and latest version of Xojo. Be sure to keep older versions installed in parallel for your computer.

Here is a list of our special versions kept for various tasks:

Use Xojo 2018 Release 4 for current projects in development.
Use Xojo 2018 Release 2 to build for MacOS 10.9.
Use Xojo 2017 Release 2 if you need a 32-bit IDE on Mac.
Use Xojo 2017 Release 1 to build for MacOS 10.7 or with Linux with GTK2.
Use Xojo 2016 Release 3 to use Windows GDI Graphics
Use Xojo 2016 Release 1 to build for Windows Vista.
Use Xojo 2015 Release 2 to build for Windows XP.
Use Xojo 2013 Release 4 to use QuickTime classes.
Use Xojo 2013 Release 3 to build for MacOS 10.6.
Use Xojo 2011 Release 3 to build for PowerPC Macs.

You can read about removals and deprecations on the Xojo documentation in the Deprecations section. We still have a few clients who want their software to run on older operation systems for various reasons. For example special hardware like PCI cards may not work on the latest Windows version due to missing drivers. So they may want to keep an app with ancient Windows version supported.

To download an older Xojo version, you can log into Xojo website, go to download archives. If you have a current license for Xojo, you can certainly ask them for an older license key if needed.

MBS Xojo Plugins in version 19.0 support all Xojo versions and plugins for older Real Studio are available on request.

Playing with SceneKit


For next MBS Xojo Plugins, we'll get a few new SceneKit classes for 3D graphics. This includes primitives like cylinders, spheres, tubes, cones, torus and boxes. You can create them, show them in 3D space, animate and rotate them as needed.

Today I translated an example from Swift to Xojo quickly to solve towers of Hanoi problem:



The new examples will be included with next MBS Plugin version.

UserNotifications framework for Mac


The UserNotifications framework has been in iOS since version 10. With MacOS 10.14 Apple added this framework for the Mac, so we have the same classes in iOS and MacOS. With MacOS 10.14 Apple also deprecated NSUserNotification API.

To MBS Plugins, we now add UserNotifications API for MacOS in both our FileMaker and Xojo plugins.

For Xojo the new plugin part UNNotification contains all the classes to wrap the framework. As usually, we make this thread safe for Xojo, manage memory automatically and convert data types for you.

For FileMaker we compile the same code as for iOS for MacOS. Our existing UNNotification functions simply work for MacOS, too. There are a few little differences like location based notifications are not supported and there are no launch images for MacOS. If needed we could add new functions for actions beside just bringing FileMaker to front.

If you like, you can try soon those new functions with the next betas.

16 Years Xojo Developer Magazine


Did you notice that over the last 16 years we got 97 issues of the Xojo developer magazine.



As you know the magazine is more up to date than any book and we highly recommend a subscription for all Xojo developers. Keep up to date on news, development best practice and learn tips and tricks.
Today you get all 97 back issues with 6876 pages in total. Check the Welcome to Xojo bundle for new users.

You need a subscription? Contact us via form before 5th Feb 2019 to win one of three short subscriptions (3 issues).

XDC Schedule Now Available


The schedule is now available for the Xojo Developer Conference. Check the session and speaker list for the conference and join us 1st to 3rd May 2019 in Miami, Florida. As you can see, there is now a MBS Plugin session listed, so you can learn what we have new this year. Let's see what new surprise we can bring to the conference.



The Marriott Biscayne Bay is located in the north side of Miami downtown and is a convenient location to reach most of Miami easily. Registration is possible and current rate is $899 for the ticket.

JPEG rendering in MacOS Mojave


We got a problem reported by am user about PDFKit RenderPage function (PDFKit.GetPDFPageImage in FileMaker Plugin and PDFPageMBS.Render in Xojo Plugin) in our plugin skipping some content in a PDF file. Precisely a server with MacOS failed to render a PDF completely as one of the images inside was missing.

The PDF itself seems to open fine in Preview.app on that Mac. But when you extract the JPEG, it fails to render
When you open that jpeg on the server in Apple's Preview.app, the app freezes. The stack trace looks like this:

+ 2669 CGImageProviderCopyImageBlockSetWithOptions (in CoreGraphics) + 137 [0x7fff367b16e0]
+  2669 IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) (in ImageIO) + 650 [0x7fff38ead344]
+   2669 IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) (in ImageIO) + 509 [0x7fff38ead5b1]
+     2669 IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) (in ImageIO) + 101 [0x7fff38ead71d]
+      2669 AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) (in ImageIO) + 1708 [0x7fff38eae880]
+       2669 AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, bool*) (in ImageIO) + 85 [0x7fff38f77397]
+         2669 AppleJPEGReadPlugin::createImageBlockSetWithHardware_intel(InfoRec*, CGImageProvider*, __CFData const*, CGSize, bool*) (in ImageIO) + 343 [0x7fff38f16b1b]
+          2669 AppleJPEGReadPlugin::createIOSurfaceWithHardware_intel(CGImageProvider*, __CFData const*, unsigned int, VPA_HWJPEGDecodeSession*, __IOSurface**) (in ImageIO) + 74 [0x7fff38f15d9a]
+           2669 AppleJPEGReadPlugin::acquireSession() (in ImageIO) + 24 [0x7fff38f15816]
+             2669 _pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib) + 226 [0x7fff637944b7]
+              2669 _pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib) + 96 [0x7fff63796d6c]
+               2669 __psynch_mutexwait (in libsystem_kernel.dylib) + 10 [0x7fff636dee76]


So JPEG rendering is done via Intel hardware in Mojave and the server in VMWare has no access to that hardware. But the same file in other places like Finder Icon preview works as that seems to use a different code path!?

Looks like the PDFKit code we use is different from the one Preview.app uses. With PDFKit drawing PDF into memory buffer to create image, it tries to do the hardware. That fails, but it doesn't wait endless, but returns quickly without rendering the JPEG image. Images not embedded in JPEG format render correctly.

Alternative way is to render would be via DynaPDF which brings its own code libraries.

PS: Also happens on a FileMaker Server on MacOS (Without VM) running without display. So if graphics card is deactivated, this seems to fail for PDFKit rendering, too. Reported to Apple with radar 47544376.

Nine month till European MBS Xojo Conference 2019 in Cologne


Monkeybread Software is pleased to announce the European MBS Xojo Conference in metropolitan Cologne, Germany. We meet in the lovely Dorint Hotel in the center of Cologne. The hotel is in the city center and in walking distance to the main station. Beside our two conference days we have accompanying social programme with our dinner event and optional two training days. For the evenings we have casual get-together in the hotel bar or beer garden.

To give you an update, we have a few attendees already, we got a few session proposals from a few potential speakers and we even got the first student to apply for a free ticket. If you like to join the conference and get one of the first 20 tickets promotion, please sign up soon. If you like to speak, please send a proposal soon and please sign up for the conference soon. As of today we have people from six countries already signed up.

The schedule:

Oct 23rd: Xojo Training in English
Oct 24th: Conference, first day with dinner event
Oct 25th: Conference, second day
Oct 26th: Xojo Training in German

Registration is open. The early bird offer available till 24th April is just 499 Euro plus VAT. For the first 20 people we offer tickets for just 399 Euro plus VAT. Attending the conference costs regularly 699 Euro plus VAT, including food and beverage in the Dorint Hotel as well as an accompanying social program.

Sessions are to be held in English. Our conference is conceived as a networking event for the Xojo community. The conference is an ideal opportunity for sharing your thoughts and your own development experience with fellow users and developers. If you like to hold a presentation, please contact us as soon as possible. Speaker receive discounted tickets.

More details on the conference website.

Alternating row colors for Dark Mode


We ported a bigger Xojo project to MacOS Mojave recently and in that process needed a good solution to update our alternating row colors for the list boxes. We used to have the usual code with "row mod 2 = 1" and picking a color for the every second row. But that is not perfect with a fixed color for switching between light and dark mode. And while the average user never switches the setting while using the application, the beta testers of course do that. So we needed a good solution for the project.

Xojo 2018r4 has the AppearanceChanged event for Application class, which is very handy to switch colors. Or you check with IsDarkMode function every time you draw something and decide the color. As CellBackgroundPaint event in the Listbox class is called for each cell, it can be called 100s of times just for redrawing the list once. So we like to optimize the handling and cache the colors.

In MBS Plugin we got last summer the dark mode additions for NSColorMBS class. The NSColorMBS.alternatingContentBackgroundColors function returns an array with two NSColor objects with the current preferred background colors for lists. So we want to use this, but not call it for every event as building an array and color objects costs a little bit performance for each draw.

So here is some example code: (more)

Xojo Design Awards 2019


Xojo Inc. will recognizes developers for their Xojo applications at the upcoming conference in Miami:

The Xojo Design Awards call for entries is officially open! The Xojo Design Awards foster creativity and encourage independent development by rewarding developers that produce quality products. Judging these awards gets more challenging every time, but the overwhelming response really illustrates how Xojo helps bring ideas to life.

The deadline for entry is March 20, 2019. The awards will be presented at XDC 2019, The Xojo Developer Conference, taking place May 1 - 3, 2019 in Miami, Florida. You do not need to be present to win.

The categories to be awarded (depending on participation) are likely to be:

  • Best Overall
  • Best iOS App
  • Best Business App
  • Best Consumer App
  • Best Cross-Platform App
  • Best Developer Tools
The criteria on which the software will be judged includes: creativity, ease of use, design, utility and best use of Xojo technologies. All software submitted to the Xojo Design Awards must be shipping at the time the software is entered (no beta software). Each winner will receive an engraved Xojo Design Award and the right to use the Xojo Design Award logo in marketing materials. For more information or to submit an entry, please visit xojo.com/designawards .

See you in Miami and good luck to win!

MBS Xojo Plugins in version 19.0


Nickenich, Germany - (Januar 22nd, 2019) -- MonkeyBread Software today is pleased to announce MBS Xojo Plugins 19.0 for macOS, Linux and Windows, the latest update to their product that is easily the most powerful plugin collection currently available for Xojo. MBS Xojo Plugins have been updated and now includes over 2400 classes and 63000 documented features, and the versatile plugins have gained more new functions:

The rewritten MapKit plugin now uses Apple's maps framework for the map views. It is 64-bit Mac only and includes showing maps, getting directions, and rendering snapshots.

Newer archive classes allow to create or read various archive formats like zip, tar and handles several compression algorithms like gzip, bzip2 or compress. An example shows you how to zip a files/folders or how to expand an archive. Compared to the old zip file classes, the new classes better handle file permissions and support more archive types.

We upgraded DynaPDFRasterizerMBS class to handle alpha channel better. You can now decide whether we render with alpha channel and provide you the rendered image as a picture with alpha channel. The updated class works with DirectDraw pictures on Windows.

We rewrote FileListMBS class for MacOS to use newer APIs for higher performance on newer APFS and older HFS+. The new ReadFileMBS and WriteFileMBS functions allow you to quickly read or write a file, faster than BinaryStream or TextInputStream/TextOutputStream.

The documentation now links to blog articles related to the classes, modules or controls related.

If you use WebKit classes, the new ProgressChanged and TitleChanged events for WKWebViewControlMBS control may be useful. With the new NSURLCacheMBS class you can change cache behavior and use NSCachedURLResponseMBS for cached responses.

Our VLC classes got updated to better work with VLC 3.x libraries. This includes newer methods to get current picture from VLCMediaPlayerMBS objects including CopyCGImage for getting CGImageMBS and showing it in the window.

GraphicsMagick got a major upgrade in this release. New functions include auto orient, resize, and extent for images. Over 80 properties are now visible in the debugger.

The SQL Plugin got improved for handling ODBC connections to FileMaker. Our SQL variant functions can now use folderitems to stream files for blob fields. SQLite is now built with API armor option to increase stability.

We got a new XLCopyOptionsMBS class for copy options in Excel files. JSON classes can now compare two objects and find items in JSON arrays. CURL can now parse MLSD results for FTP file listings into CURLSFileInfoMBS objects. PNGReaderMBS and PNGWriterMBS classes can now handle EXIF data blocks directly.

This release drops a lot of older classes, which are 32-bit Carbon only and can't really be used any more in Cocoa applications. Old carbon classes for ColorSync, View, Drag & Drop, Menu, Font, ATS and Navigation dialogs are gone. QuickDraw related picture support is gone and if you need a new plugin for Real Studio, please contact us.

Finally we updated CURL to version 7.63.0, DynaPDF to 4.0.25.72, freetype to 2.9.1, GraphicsMagick to 1.3.31, iconv to 1.15, libarchive to 3.3.3, libexpat to 2.2.6, OpenSSL to 1.1.1a, png to 1.6.36, regex to 8.42, SQLAPI to 4.2.4 and SQLite to version 3.26.0.

See release notes for a complete list of changes.

Older blog entries:

2019-01-21 Xojo Training in Europe
2019-01-20 Real Studio plugins on demand
2019-01-20 MBS Xojo Plugins, version 19.0pr9
2019-01-18 Booked for XDC 2019
2019-01-17 Use Apple Maps in your app
2019-01-17 Smileys and UTF32
2019-01-15 MBS Xojo Plugins, version 19.0pr8
2019-01-08 CURL change for email download via IMAP
2019-01-08 MapKit Framework for Xojo
2019-01-07 xDev 17.1 Issue
2019-01-07 European Xojo Conference Upgrades
2019-01-05 MBS Xojo Plugins, version 19.0pr7
2019-01-04 New ReplaceLineEndingsMBS function
2019-01-02 MBS Xojo Plugins, version 19.0pr6
2019-01-02 MapKit upgrade coming to Xojo
2018-12-24 Merry Christmas
2018-12-24 Ten month til European MBS Xojo Conference 2019 in Cologne
2018-12-23 MBS Xojo Plugins, version 18.6pr5
2018-12-21 SQLite Manager and Doctor updated
2018-12-19 Arbed 1.8.11 updated for Xojo 2018r4

Archives

Feb 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