The September/October (16.5) issue of xDev Magazine is now available. Here's a quick preview of what's inside:
**Reports Revisited** by Ulrich Bogun and Martin Trippensee
Xojo's built-in reporting gets flack for not being full-featured, but it's more powerful than you think. Ulrich and Martin have figured out a way to hack it for better reports!
**An Excel Database** by Paul Budd
Should you use Excel as a database? Probably not. But you can, and there are times (like when you aren't in control of the decisions), that it's useful to be able to use SQL to query a spreadsheet.
**Give Yourself to the Dark Side, Part V** by Sam Rowlands
Sam's article a few issues ago on "Dark Mode" sliders was derailed by Apple's changes with MacOS Mojave, so he's back to revise his methods.
**Refactoring a Controller Module, Part 2** by JC Cruz
Jose continues his explanation on how to refactor a controller module to support other models without breaking existing code.
*PLUS*: Progressbars, connecting to databases, Xojo 2018r2, hierarchies in a data mart, HavIBeenPwned, and more!
As you may know we have the AVFoundation classes to capture video from camera including functions for live getting a picture. You can pass that picture to CIDetectorMBS class to detect faces, QRCodes, texts or rectangles. Now we got a new option to have the detection running on a preemptive thread to keep the Xojo app more responsive:
We get live image in background thread, pass it to detector and get you the captureOutputDidOutputSampleBuffer event with detected features as parameter. This way you can do live detection with high performance.
If you need more, you can always get current frame on Mac & Windows and pass yourself to TesseractMBS class or zxingMultiFormatReaderMBS class yourself to detect text or barcodes.
Added more convenience functions for Contacts classes: allContacts, AllFetchKeys, unifiedContactsMatchingPredicate, unifiedContactWithIdentifier, unifiedMeContact for CNContactStoreMBS class and new CNContactFetchRequestMBS constructor.
The MBS Xojo Plugins provide various functions for HTMLViewer to use JavaScript in Xojo applications. Here a few details on the various ways to run JavaScript in the HTMLViewer in Xojo.
Please take a look on the following progress indicators:
The example project for this applies CoreImage filters to the standard control to change it's colors.
Coming with next MBS Xojo Plugin prerelease. Or email us, if you like to try today.
For our plugins I updated libxml2 to a newer version. And while doing that, I saw there is also libxslt available, which can be used together with libxml2 to support XSLT.
So I built LibXLST for all platforms (2x Mac, 4x iOS, 3x Linux and 2x Windows!) for me. Once the libraries can be linked to the plugin, I started make a new function for the MBS FileMaker Plugin: XML.ApplyStylesheet.
It allows you to apply a style sheet to an XML document and transform the XML to something new. Fore example you transform from one XML to other. This includes transforming XML to just text or html text. We'll certainly include a few examples with next plugins.
If you have ideas for more functions, please let me know.
By the way XSLT 2.0 is a common wish, but the problem is that there aren't many libraries for C/C++ doing that. And for example the Saxon library is quite expensive for redistribution.
Xojo has such a function built-in: XMLDocument.Transform, so no need currently for a plugin there.
Over the years I enjoyed to clone disks on my Macs. It's always good to make copies of everything with Carbon Copy Cloner or similar applications. You have a backup disk handy to boot your Mac in case of an emergency. External SSDs with USB-C or Thunderbolt interfaces got cheaper. Time Machine and an online backup are also useful, but serve a different thing. Usually before you move your stuff to a new Mac, you may want to make a copy to one of your external disks.
There are two problems with restoring from a clone to a new Mac. First, you have sometimes a MacOS version mismatch. The 10.13.6 coming with a new MacBook Pro is not the same as the one coming for an older MacOS 10.13.6. Probably some newer drivers are missing.
Second, there are Secure Tokens. If you format a Mac disk and clone from a backup, you don't get your secure tokens for the admin users. So you can't enable things like File Vault. Your user is not trusted by the OS itself. You have to go through the normal OS installer to install a fresh copy of MacOS and the installer will grant a secure token to the first user you create, later all new admin users you create get one, too. The migration assistant also grants the secure token automatically, so you get it. But if you just clone, there is no way get one.
And now a speed tip for migration assistant. You want a fast connection to clone. The fastest you can get on a Mac is usually Thunderbolt 3 with 20 Gigabits. So connect both Macs with a new Thunderbolt cable. If one Mac is older, maybe Thunderbolt 2, maybe with adapter for 10 Gigabit. If not Thunderbolt, use a good Ethernet cable, so you get gigabit connection. The worst may be to have an older Wifi network and doing migration with a 50 MBs connection.
Good luck with migration!
Keep a backup of the old state for some time in case something missed to copy to the new Mac.
As you see the main difference between both modes is whether the text content view resizes with the the textarea control. Normally it does, but to disable line wrap, we disable that and allow it to size to a huge size horizontally.
We got a new MacBook Pro to test here with Core i9 CPU. This is really a mobile powerhouse and you can easily get all 12 cores busy with some real work. It looks like the MacBook Pro can do that load for half an hour easily. Yes, it may get warm above the keyboard, but it stays cold for the lower parts.
While battery may be advertised as running for 10 hours with normal usage like web surfing, well at the full work load, e.g. while compiling large project with Xcode, it may only run 70 minutes till the battery is empty. And that is to be expected as the 83.6 watt-hour battery can only deliver the 50 to 60 watts needs for the CPU for just over an hour.
GeekBench shows 4058 for Single-Core Score and 13845 for Multi-Core Score on the older MacBook Pro (15 inch, 2016) with Core i7 @2.9 GHz.
The new MacBook Pro 15 inch with Core i9 @2.9 GHz shows 5430 Single-Core Score and 23700 Multi-Core Score.
To compare, the 2 year newer model is 33% faster single-core and 70% faster multi-core.
We do not see any speed problems with the CPU and look forward to let this machine increase our productivity with more RAM and CPU power on the go than we ever had before.
We have the AVCaptureVideoDataOutputMBS Class in MBS Xojo AVFoundation Plugin. This class allows you to get live data from the camera as CMSampleBufferMBS objects. Now this was a bit slow as we did all the processing on the main thread. But for doing something useful in 30fps, you need time on the main thread for your Xojo app and we need to move as much work as possible of the heavy work away from the main thread.
So for next pre-release we cache properties in CVImageBufferMBS class. If you query NSImageMBS, JPEGData or CIImageMBS there, we will create them for you and remember the values, so in case you call the methods again, we have the values directly available and don't recreate them.
As conversion of the camera data (e.g. in YUV format) to RGB may be expensive, we want to do the conversion on the preemptive threads. So we added PrepareCIImage, PrepareJPEGData and PrepareNSImage properties to AVCaptureVideoDataOutputMBS class. If you set them, we will do the part of the work you requested on the preemptive thread and than pre-fill CMSampleBufferMBS and CVImageBufferMBS with the data, so query calls on the properties will be very quick.
This does not reduce the CPU time needed for the whole app, but moves more work to other threads, so you have more time on the main thread for your application doing something with the video.
Omegabundle for Xojo 2018 Developer Tools Bundle Announced; Save 89% on Top Tools
Due to request of some buyers who missed first deadline, we extend the offer for another two weeks.
You can buy it several times, e.g. one for each of your developers. Or buy multiple copies to get more than one OS for Valentina Server.
A new release of Xojo is now available for download. With over 160 changes and improvements, this release focuses on optimizations and fixes, particularly for Windows and iOS.
Xojo 2018 Release 2 includes:
Continued Windows optimizations
iOS Improvements, such as:
iOSTable supports pull-to-refresh
iOSTable better supports varying row heights with iOSCustomTableCellviOSView supports large titles on iOS 11+
iOSHTMLViewer now uses WKWebView for better compatibility
Added SpecialFolder.Resources and GetResource methods
SQLiteDatabase updated to 3.23.1
HTMLViewer uses WebKit2 on Linux (if available) and latest Chromium Embedded Framework 3 on Windows (when WebKit is selected)
The complete list of improvements can be found in the release notes in the product download.
Due to the changes in the graphics class and the WebKit upgrade for Windows, please use latest MBS Plugins 18.3 or better 18.4 prerelease.
We all look forward to presentations about Android, the new Web Framework other news in the Xojo keynote.
Register here. Attending the conference costs regularly 699 Euro plus VAT, including food and beverage in the Maritim 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.
PS: OmegaBundle includes a transferable coupon to save 100 Euro on the registration fee.