Looking into WebUploadedFile class

The Xojo Web framework contains a special class to hold information on an uploaded file, the WebUploadedFile class. Used by the WebFileUploader control this class provides you the information of the uploaded file. Let's take a deeper look:

An uploaded file can either be backed in memory or backed by a temporary file. There is a threshold when files are put in memory or into a file and we don't know when exactly this happens. But there may be multiple reasons like memory usage.

Consequentially if you query length, you are returned the length of the MemoryBlock or the temporary file. If you query Data, you get back the MemoryBlock or for a file backed one, the data is read and returned. This means the file has to fit in memory to not cause an exception. And it may cause a delay for the time to load the file. Sadly the trigger to loading data in memory may be when you stop in debugger and inspect the WebUploadedFile file. You then see file property and data property have content.

The UploadComplete event is where you get the array of the uploaded files. Here you may process the data, e.g. take it pass it to Picture.FromData to read in a picture. If you store the WebUploadedFile object in a property of your web page, be aware that file backed uploaded files get their temp file deleted when the event finishes. So you have to take the data or query file property and copy the file. For performance doing a hard link into your own location may be the quickest way.

The deletion of the temp file caused a few support calls in recent times where clients passed the folder items to DynaPDF or Zip/Archive functions to process them. Our functions had trouble to open the files, which is no wonder when being deleted.

Looking on the temp folder, it looks like Xojo may push an upload into a temp file. Then later processes it and copies data into smaller temp files (or hold them in MemoryBlocks). Finally the temp file deleted when the request is processed.

For the future, I'd wish they would delete the temp file in the destructor of the WebUploadedFile object, so we could keep it around a bit longer. A trick to do that may be to open the file and keep a BinaryStream for it around. On macOS and Linux you can delete an open file, so you can read it until the BinaryStream is closed and the file is really gone. On Windows you can't delete the file while it is open, so you may need to delete it yourself later.

Linux Compiler Upgrade

After we updated compilers for macOS and Windows recently, it may be time for Linux.

To build all our plugins for 64-bit Linux (x86_64) we moved to Ubuntu 18.04 this week.

It turns out that updating to a new version of a compiler is easy. You rebuild everything, check new warnings and handle some error messages for changes in C++ frameworks.

But then we tried the plugin on CentOS 7.9 and this was a disappointment. Tons of missing libraries. Well, looks like the c and c++ libraries in CentOS are a few years older than the one in Ubuntu 18.04. Now either we fix the dependencies or we have to redo with CentOS to have a common base.

It turns out you can track down dependency by dependency and use various compiler options to disable newer features and stay with older C++ version 11 instead of 14 or 17. I'd wish this would be easier, but I had to recompile dozens of times to see what each changes causes. e.g. for a normal standard C++ string, you have nine ways to construct them. But we now have to avoid the newer variants and then it works.

On the end the plugin now loads on CentOS 7.8 and Ubuntu 18.4.
If you use an older version of Linux 64-bit, we may be able to avoid another function for you, but not a dozen!

Our first build of the plugins required glibc version 2.27, glibcxx 3.4.21 and cxxabi 1.3.9 as those are the ones coming with Ubuntu 18.04.
The final builds are down to glibc version 2.17, glibcxx 3.4.18 and cxxabi 1.3, which makes it compatible with CentOS 7.9.
Ubuntu 16 comes with CXXABI 1.3.9 and glibc 2.23, so we expect the plugins load on Ubuntu 16, too.
We also tried a fresh installed CentOS 7.7 and it seems like things work there, too.

Coming soon for pr5. If you like to try before that, please let us know.

Xojo 2021r1.1 available

A little surprise this evening is the release of the Xojo 2021r1 update. Just three weeks, but a few things are urgent, so let's check the update.

Release Notes   Download   Announcement in Forum

The new Xojo update brings a few things, which didn't meet the deadline for r1. With Xojo r1.1 you get the universal linker included, which allows you can build applications on an Apple Silicon Mac without using Rosetta. The bundled utilities Debugger Stubs, Lingua and Image Maker apps are now macOS Universal as well as your worker console apps. Finally the debugger for iOS applications can use the iOS simulator with native code.

Please note that you will need newer plugins from us for arm64 code in simulator. Please update to 21.1pr4 or newer.

There is a new DesktopColorPicker control as a surprise. You may know that Xojo has a SelectColor function, but recent macOS updates broke the functionality. You must now use asynchronous mode on macOS, either with the new control or our NSColorPanelMBS class.

We are happy to see ongoing development on the web framework. The memory leak for whole sessions seems to be fixed. I hoped the JSONItem leak would also be fixed, but that didn't make it before the deadline. Well, eventually you have to ship.

If you need to localize your Xojo app, please check the updated Lingua app. It has a scripting engine (using XojoScript), which allows you to automate various tasks.

Nevertheless, this is a solid release and we used it for a few things the last weeks and had no issues with our projects. Please try it and report feedback to Xojo soon. What have you noticed?

MBS Xojo Plugins, version 21.2pr4

New in this prerelease of the 21.2 plugins:
  • Fixed bug in SKReceiptRefreshRequestMBS class destructor.
  • Added new constructor for CKContainerMBS class to create a copy with your subclass.
  • Added keychain example for iOS.
  • Fixed a memory leak in FileListMBS class for Windows.
  • Updated SQLAPI to version 5.1.4 with new DuckDB support.
  • Fixed NSCollectionViewControlMBS to work on macOS versions before 10.13.
  • Updated zxing library to get a few newer bug fixes.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/ or from Dropbox.
Or ask us to be added to our shared Dropbox folder.

ChartDirector 7 update

The next version of ChartDirector, version 7, will come in spring to summer 2021.

We already started with the development for a future version of our MBS Xojo ChartDirector Plugin.
We got newer headers and libraries for C++ to try. Windows and macOS builds already. Linux and iOS are still to do. And of course examples and documentation.

For the new features, we'll have a new CDMultiPagePDFMBS, CDDiscreteHeatMapLayerMBS and CDDataAcceleratorMBS classes.

Not sure whether this goes in our May release yet. But if everything is ready in time, we may ship the update with MBS Plugins 20.2 in May. But otherwise it may go into 20.3 in July. If you have a current license by release date, you will get this a free update. Older licenses may need a license renewal.

See also ChartDirector 7 preview blog post.

20000 members in Xojo forum

Have you recently visited the Xojo forum?
There are now over 20000 members. At least that much people got the basic badge.

The forum has been steadily growing over the years and recently I think the activity increased since Xojo Inc. installed the new forum software. We just interact usually with the about 1000 people being active on the forum. The majority of members just comes from time to time to search for a tip on an issue and never ask something. I personally know a few people in Germany, which are not good in English and will probably never post, but read a little bit with help of translation software. Something like 500 people are regularly posting on the forum. And the ones we know personally have come to one of the Xojo conferences.

Since Xojo added more targets over the years, the user base got diversified a lot. 10 years ago we were mostly desktop database developers, but now you have lots of web development, some iOS developers and even people only writing utility for small linux boxes like the Raspberry Pi.

Over the years we have seen people come and go. With 20 years in business, we have seen clients get engaged, get married and raise children. Other have used our products and retired or passed away. There is always change in the member list with people coming and going.

As we make plugins for both Xojo and FileMaker, we saw quite a few people using both FileMaker and Xojo. And you may remember the table on one of the past Xojo conferences with FileMaker developers meeting there to discuss their projects? Always use the right tool for the right job!

Earlier in October 2017, we reported 18000 users and the old Real Studio forum topped at about 7500 users.
Looking forward to celebrate 25000 users. We can still take bets on what year that will be.

Big Sur and Xojo 2019r1.1

Since I moved to using Big Sur now for macOS, I had a little trouble running apps with Xojo 2019r1, a version we still use for a couple of projects.
Lucky with a bit of searching around, I found a workaround posted by Norman Parlardy:

Big Sur and 2019r1.1
The official line is “if you want to run Big Sur you MUST use a version newer than 2019r3.2” – at least for desktop apps (web apps arent affected in the same way)

But you CAN actually get 2019r1.1 to work for desktop apps on Big Sur

Here is what I have done to be able to run Xojo 2019r1.1 on Big Sur (Intel) – and to successfully DebugRun and Build Desktop applications:

Replace these files in the Xojo 2019r1.1 application bundle with those from 2019r3.2:

Contents/Resources/SDKStubs/macosx10.14/System/Library/Frameworks/AppKit.framework/AppKit.tbd
Contents/Resources/SDKStubs/macosx10.14/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit.tbd

After I copied the files, the Xojo version does build and no longer complains about UIFoundation framework missing.
Thanks Norman.

Hunting a memory leak in Xojo Web target

A few months ago we saw memory leaks in the Xojo web engine. Sessions were not released properly. The suspicion was that somewhere in the web framework may be a weak reference. The bug was reported by me as 63687. By reproducing it with the official EEWeb sample project, it was clear that it's not my own code.

This bug turned out to be a duplicate of 63378. And that one was fixed in April, so it may be in current test version and may go into verification and the next release. Hurray!

Now the hunt continues because while looking for the bug we got a little code to dump class counts. The code uses runtime object iterator to loop over all objects and counts how many of each class/vartype we have. Just counts on how many arrays of each type (integer, object, boolean, etc.) and what object classes via Introspection like how many Dictionaries, JSONItems, WebPages, etc. The print showed that with newer Xojo versions the EEWeb project leaks thousands of dictionaries. At least I would expect that when a session ends, we go back to the object counts we had before. Not for the first session as it initializes a couple of global objects. But when I let first session expire and then create 3 new ones and wait for those to close, the counts should go back to normal.

I wondered why we had so many dictionaries. For my test code I added code to dump those dictionaries to a text file. That showed a ton of dictionaries containing JavaScript snippets, probably stuff Xojo's web engine sent to the browser. Since the JSONItem class didn't show in my statistics, I wondered who would leak the dictionaries. The newer JSONItem in Xojo 2021r1 calls GenerateJSONString framework function internally, which is implemented in C++. Somewhere inside the reference court for the dictionary is increased, but later not decreased. The increase may be superfluous. Usually objects coming in as parameter don't need to be retained and released.

To demonstrate the problem to Xojo engineers, we got this snippet: (more)

Linux 64-bit ARM support coming to Xojo

Have you seen the updated roadmap from Xojo Inc.?

It now listed ARM64 for Linux as an item they work on. This currently number 2 in the feedback user favorites. We are very happy Xojo Inc. finally schedules this feature for implementation. We asked for that long ago.

The feature request 42794 was created in 2016 when Raspberry Pi 3 with 64-bit CPU got available. While most Raspberry Pi computers still work in 32-bit for compatibility, you can run the newer ones with 64-bit Debian Linux distribution. And since Amazon provides ARM based server hardware for their AWS EC2 service, you may enjoy using those machines with Xojo applications soon. AWS with ARM are priced lower compared to Intel based systems. Finally Apple's recent M1 Macs run virtual machines with Linux, which could also benefit from Xojo applications.

For our plugins we have Linux ARM 64-bit support already. All our plugins are built for arm64 and wait here for a future Xojo version to test. Of course we need a newer plugin SDK, which may introduce this target and clarify a few things like the updated plugin structure.

See older blog post Build System Updates for new targets, Building for future Xojo targets and Building plugins for Linux on ARM.

Please know that the roadmap lists various items Xojo Inc. works on, but not all and not necessarily in the order they ship. The listed items tend to be the ones, which takes multiple releases to get finished. Smaller items, which can be done in a few days by an engineer, may not be listed there.

Lost messages

Client contact us in various ways. Mostly email, but some go via website chat, feedback form, text/iMessage/Signal messages, some use Skype or send private messages on LinkedIn, Facebook, Twitter or Xing. All the messages usually arrive and we get notified. But sometimes it fails.

If you don't get an answer within a reasonable time, e.g. 2 days, please contact us again using an alternative way. The idea with 2 days is that there may always be a holiday or time in an airplane while traveling, where we have no chance to look into your message.

Recently we had a client putting several support requests into a web form on our website which all were not delivered. Not sure what the outage was that let a few of many messages not come through. Other clients sent messages before, in-between and after and those worked. If the web form doesn't work, please come back via email. The client was of course very disappointed, but waited weeks before they contacted us via email about this. We could have helped quicker.

One thing not to forget is to put our domain monkeybreadsoftware.de on a white list for your spam filter or add our support email address to your contacts. This may prevent spam filters to block us. Regularly our emails get blocked and answers or even license key delivery fails. A way to overcome that is to provide a second email for us, so we can answer to that one. And finally typing your own email address into a form can be difficult. If we have you in the database or a previous email, we can correct a typo, but for new clients, we often have no way to answer them.

We also encourage users to post on the relevant forums. The community may help with questions about our plugins and often answer quicker than us. But even while we monitor a dozen forums for new posts regularly, we may still miss a message there. But feel free to refer to @Monkeybreadsoftware in your postings to call us specifically.

As always, please don't hesitate to contact us if you have questions.

Spell Checking on Windows for Xojo

We had NSSpellCheckerMBS class for macOS for years. But for Windows we had a missing spot in our class lists. Microsoft added spell checking for Windows 8 as a system wide service.

For MBS Xojo Plugins in version 21.2 we add the WinSpellCheckerMBS class to check for supported languages. Pick a country & language specification and initialize a new spell checker. Then you can check some text for error sand get an array of WinSpellingErrorMBS objects. Spell checking may suggest direct replacements, deletions or showing suggestions. We do have a Suggest() function to ask for suggestions and show them the user.

If you like, you can define auto corrections, ignore words and add words to teach the engine your custom words. Optionally you can use user dictionaries.

In general the functions work on Windows 8 and newer except a few newer functions like the Remove method, which needs Windows 10.

Please try and let us know how it works. You may need to develop your own integration to show in text area what is mistyped.

MBS Xojo Plugins, version 21.2pr3

New in this prerelease of the 21.2 plugins:
  • Added classes for spell checking on Windows: WinSpellingErrorMBS, WinSpellCheckerOptionDescriptionMBS and WinSpellCheckerMBS.
  • Updated HIDAPI library to version 0.10.1.
  • Removed WriteAsync for HIDAPIDeviceMBS class.
  • Added GetInputReport and VersionString methods to HIDAPIDeviceMBS class.
  • Changed iOS Simulator plugin parts to be universal.
  • Added more key getters for NSURLMBS class.
  • Added constructor for string to SQLDateTimeMBS class.
  • Updated SQLAPI to version 5.1.4b6 with new DuckDB support.
  • Patched SQLAPI to parse timestamps with fraction better.
  • Added new constructor for CKDatabaseMBS class to create a copy with your subclass.
  • Updated DynaPDF to version 4.0.51.144.
  • Added ChangeFontEx function to DynaPDFMBS class.
  • Added kcoDefaultNormalize, kcoDefaultPDFA1, kcoDefaultPDFA2, kcoDefaultPDFA3 constants for use with CheckConformance function to DynaPDFMBS class.
  • Updated CURL library to version 7.76.1.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/ or from Dropbox.
Or ask us to be added to our shared Dropbox folder.

Thank you for the birthday cards

For my birthday last Sunday I got a lot of nice emails, greetings and comments. But a few people went further and surprised me with letters, cards and even some presents!



We collected them all and put them on a fish net in the hallway, so we can remember them.

Thanks everyone for your good wishes and heart-warming texts. The Xojo people for example printed a special postcard with several pictures with me and staff on it.
See you all soon on the next conferences!

MBS Xojo Plugins, version 21.2pr2

New in this prerelease of the 21.2 plugins:
  • Added CopyCellValue method to XLSheetMBS class.
  • Changes NSAttributedStringMBS and NSColorMBS classes to not reference macOS only function selectors.
  • Changed parser in JSONMBS to be accept leading zeros on numbers.
  • Updated DynaPDF to version 4.0.50.143.
  • Implemented MacMousePositionX and MacMousePositionY functions for RemoteControlMBS module for macOS 64-bit.
  • Added WinMouseClick taking integer parameters to RemoteControlMBS module and deprecated the boolean variants.
  • Added TypoAscender and TypoLeading properties to DynaPDFFontMetricsMBS class.
  • Added userDidAcceptCloudKitShareWithMetadata event for NSApplicationDelegateMBS class.
  • Enabled RabbitMQ plugin for iOS.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/ or from Dropbox.
Or ask us to be added to our shared Dropbox folder.

Happy Eastern 2021


MBS Xojo Plugins, version 21.2pr1

New in this prerelease of the 21.2 plugins:
  • Added CDViewPortControlBaseMBS class and new RealTime ViewPort example for ChartDirector.
  • Added code to use ICU libraries for SQLite. See new properties on InternalSQLiteLibraryMBS module.
  • Added DynaPDFHeaderFooterMBS class.
  • Added GetInfoReferer, OptionDOHSSLVerifyStatus, OptionDOHSSLVerifyHost, OptionDOHSSLVerifyPeer to CURLSMBS class.
  • Added InitModules method for JavaScriptEngineMBS class.
  • Added more methods to NSToolbarItemMBS and NSToolbarMBS classes.
  • Added more NSVisualEffect* constants for NSVisualEffectViewMBS class.
  • Added more properties for NSSharingServiceMBS class.
  • Added new NSImageScale constants to NSImageViewMBS and NSImageCellMBS classes.
  • Added optional ContentTypeMethod as parameter for AddAttachment in CURLEmailMBS class.
  • Added RabbitMQ plugin wrapping the RabbitMQ message broker.
  • Added scaleTo method for CIImageMBS class.
  • Added workaround for error 561 in BarcodeGeneratorMBS class. We lower ECC level now if text doesn't fit otherwise.
  • Changed CURL classes to not print password for SFTP transfer in debug log. Left overs from debug session in 21.1 betas.
  • Changed DrawRotatedTextMBS, MeasureRotatedTextMBS and DrawCGPDFDocumentMBS methods to use newer API to get the CGContextRef for drawing.
  • Changed functions returning CVImageBufferMBS to return CVPixelBufferMBS if the image buffer contains pixels.
  • Enabled math and geopoly functions for internal SQLite library. see InternalSQLiteLibraryMBS
  • Fixed a problem in CURL with OptionSSLKeyBlob in CURLSMBS not working correctly.
  • Fixed an issue with Optimize method in DynaPDFMBS class complaining about no open output file.
  • Fixed error handling in JavaScriptEngineMBS class, broken in v21.1.
  • Fixed problem in UDPSocketMBS class with stack overflow exception if you happen to call poll within DataAvailable event.
  • Fixed problem with NSAutoreleasePool problem with App Store.
  • Fixed scaling issue with CDViewPortManagerMBS passing port size.
  • Fixed scaling issue with setTickDensity method in CDAxisMBS.
  • Rewrote DeclareCallBackMBS with a thread safe queue for asynchron mode.
  • Updated CURL library to version 7.76.0.
  • Updated DuckDB to version 0.25.
    Please note that the binary format for files is not compatible with older version. Please export and import into new database.
  • Updated DynaPDF to version 4.0.49.142.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/ or from Dropbox.
Or ask us to be added to our shared Dropbox folder.

Company's 21st Birthday

1st April 2000 I founded my company. Well, I registered as a business by getting my business registration (Gewerbeanmeldung) here in Germany.

That was 2 months before I finished school (Gymnasium). While alternative civilian service (Zivildienst) and my time at the university, the company run well and I didn't have to depend on my parents or student loans. Actually the company got me so busy over the years, that I spend less time at university and since 2007 this is my full time job.

I had a few clients in that time interested in development in REALbasic, a very young development environment which started two years earlier. At that time I had a website with a few freeware utilities, so people could see that I can do development. Two years later the demand for plugins got so high, that end of 2001 I started publishing my own plugins. And since 2006 I got into FileMaker Plugin development.

Thanks everyone for supporting me over the years!

PS: If you need a new license this weekend, use coupon code Birthday for an 21% discount.
The biggest plugin in space...

Archives

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