ChartDirector and DynaPDF for iOS


Did you know you can use MBS Xojo DynaPDF Plugin and MBS Xojo ChartDirector Plugin for your iOS projects?

Get a license with our Cyber Monday sale. Use coupon code BlackFriday today!

(more)

Cyber Weekend Deals


Look at all the deals available on xojo.io website:



Enjoy the discounts!

All about EndOfLine


Did you know there is an EndOfLine class in Xojo? You like a proof? Just run this code in a new project:

Dim e As New EndOfLine Break

Now you see the object in the debugger. This is of course an implementation detail and could change.

When you use EndOfLine in the code as value and not as class, you call a global function called EndOfLine returning the EndOfLine object. This is optimized and we can verify in the debugger that we get the same object each time. If you use it in a string operation, it may invoke one of the operator methods like Operator_Convert to get the string for the current platform.

The individual functions Android, LF, iOS, CR, Unix, macOS, CRLF, Windows are shared methods (or properties?) on the class. Update: Introspection shows those are shared properties, but computed. And they seem to be implemented differently, so some return the same string always, while others just create a new string each time.

Due to the fact that using EndOfLine invokes two functions to get the object and then the string, it makes sense to cache the value. A line like this may speed up access to EndOfLine :

Dim EndOfLine As String = EndOfLine

Following access is at least double the speed, so if that is a bottleneck for you, you can optimize it!
But only worth it, if you call EndOfLine a lot in loops within your code.

Wishes on Feedback

Looking into EndOfLine reminds me to two feature requests, I'd like to see implemented in a future Xojo version. Beside with EndOfLine, they could help us for our own code. All those shared properties could be real properties for the compiler, which could be marked to be read only for access from outside. For example a module could define them and in a Constructor for the module they could be assigned. So we need a kind of constructor for modules like in feedback case 24018. The constructor may only access things in the module and should be called before app.open. The properties could have an attribute to mark them public to get, but private to set. Like the idea in feedback case 49428. If this would be implemented, you could skip all those getter functions and the compiler could make much better code to just lookup the global EndOfLine property easier and skip it for the shared properties.

Let's say we would get those implemented and we could have a module like this:

Module TimeModule
Sub Constructor() StartDateTime = DateTime.Now End Sub
Property StartDateTime As DateTime Attribute ReadOnly
End Module

As said, constructors should be run before App.Open and prepare the module. The compiler would assemble list of modules and call Constructor methods if those exist. Per definition access to other framework methods is possible, but not to other modules as order of initialization would not be defined. Although compiler could sort module names of course and then order is defined!

Finally there is also a Text.EndOfLine global function, which returns you EndOfLine as Text data type. But be aware, that on iOS Text.EndOfLine and EndOfLine.IOS don't return the same result. One returns Chr(13) and one Chr(10).


Thanksgiving Sale


For this year's Thanksgiving in America, we offer again discounted licenses for our MBS Plugins for FileMaker and Xojo.
Please use coupon code BlackFriday for our web shop to order new licenses with a 20% discount. This includes DynaPDF and LibXL.

Order MBS FileMaker Plugin     Order MBS Xojo Plugins     Order LibXL

If you have special needs, you can email us to get an invoice or Paypal payment link directly. We know some people need to wait till next week to order, so the offer is valid till Tuesday.

Second if you have purchased previously an individual MBS Xojo Plugin part from the Complete Set within the last two years, but not the whole set, we offer you an upgrade to the Complete set for the update price. Please consider to get the whole collection of 40 plugins instead of just one plugin.

See also Xojo Thanksgiving Sale and a xojo.io for a collection of offers for Xojo developers.

Use Text Finder for TextArea in Xojo


Have you checked the NSTextFinderMBS class for macOS to show a search field within a text area?

With a little code you can provide a find & replace toolbar within the text area like this:

The GUI is standard from macOS and localized by the system.

Here is the sample code you can use:

Sub ToggleFindbar() // get MBS objects for the Xojo controls Dim textView As NSTextViewMBS = TextArea1.NSTextViewMBS Dim scrollView As NSScrollViewMBS = TextArea1.NSScrollViewMBS // first run, we create the TextFinder object If finder = Nil Then finder = New NSTextFinderMBS // connect it to the text view and the finder.client = textView finder.findBarContainer = scrollView finder.incrementalSearchingEnabled = True End If If CheckFindbar.Value Then // enable find bar If scrollView.FindBarVisible Then // show the find interface finder.performAction finder.kActionShowFindInterface Return End If If textView.usesFindBar Then // show the find interface, if it was hidden before scrollView.FindBarVisible = True Return End If // enables find bar textView.usesFindBar = True End If If CheckFindbar.Value Then // show it finder.performAction finder.kActionShowFindInterface Else // hide it finder.performAction finder.kActionHideFindInterface End If End Sub

You may just have a menu command for search and when it's triggered, you can check what Window.Focus points to. If a text area is in focus, you can simply call the method above and pass the text area to show the find bar.

Please don't hesitate to contact us with your questions.


Xojo 2020r2 arrived


After an extended beta phase Xojo 2020r2 was released today. See announcement, Release Notes and download. This is a huge release, which implements a couple of points on the roadmap and brings us Apple Silicon support, plugins for iOS with iOS getting API 2.0 framework and new worker class and even a few new controls for search and date/time picker.

Apple Silicon

This Xojo version can build applications for Apple Silicon and it can build universal applications, too. We updated MBS Plugins and include Apple Silicon support there in version 20.5. You can try it, but we'll soon have a new beta for the next version as we find issues while more people try building for those new Macs with M1 processor.

All MBS Plugins in 20.5 (and future versions) include an Apple Silicon version. Not all libraries are available yet for Apple Silicon and most functions have not been tested although since it's basically the same code on the same OS with a compiler change, we expect everything to just works. (more)

Black Friday coming soon


As you may know Americans love to shop on Black Friday and Cyber Monday. This year Black Friday is 27th November. About half our customers are in North America, so we are happy to offer you a discount if they buy this weekend. Our offer will go live in the next days and should be available in time.

We plan to offer coupon code BlackFriday for the web shop with 20% off for new licenses of MBS Plugins, DynaPDF and LibXL.
Updates are already offered with discount (usually 50%) compared to new purchases and and our academic prices already have a discount. If you like, you can email us to get an order link for all licenses you need or provide an invoice if needed.

Order MBS FileMaker Plugin     Order MBS Xojo Plugins     Order LibXL

As usual the discounted offer allows you to buy whatever licenses you may need in the next year. As you know that Apple Silicon is coming to a lot of clients next year, you may want to have current plugin licenses.

If you need a license from Xojo Inc. or their third-party store section, you may to check the Xojo store on the weekend. Everyone interested in a license for the next version 2020r2 featuring Apple Silicon support, should go and buy one.

For FileMaker there is still an offer available for buying one FileMaker Pro license and getting a free one to give away. This offer expires 18th December. If you or your client has an expired FileMaker license for over 6 months, you may get a discount for a welcome back offer with 25% reduced pricing. Also there may be possibilities to get a FileMaker Server for smaller companies with thee or four users.

You have a question? Please don't hesitate to contact us by email or phone. We may help to point you to the right offer.

News from the MBS Xojo Plugins Version 20.5


In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 20.5.

Excel - News from the XL topic

Let's start with the innovations in the XL topic. With our plugins you can create and edit Excel documents via Xojo. In this release we have new features that extend the functionality of this topic. With the new method CopyColumn from the XLSheetMBS class you can copy the values of a column of a table into another column. This copying process is not limited to the worksheet or book. You can also copy columns between different books and sheets. In the last parameter of the method you can set the copy options. That means you can decide which type of content is copied. If that option is nil we copy everything.

An other new method is ReadValue from the XLSheetMBS class. With this method you read a value from a cell as variant. Depending on the content we return a number, a boolean, a text or a timestamp. Empty or error cells will return nil.

(more)

The VariantTypeString function for Xojo


We got a handy function to query a type string for a variant. Useful when displaying variant content in our apps together with stringValue to get text representation. It uses our new GetVariantTypeMBS function to detect unsigned integer types.

The function is using BitwiseAnd to detect if the array bit is set and then BitwiseAnd with the ones complement to remove the bit for the type. For speed we use a dictionary filled on first call. And in case ever a new type is introduced, the break statement should stop in debugging and we can check the new type value and add it to the list.

Please let us know if you like it or have improvement ideas.

(more)

MBS Xojo Plugins in version 20.5


Nickenich, Germany - (November 17th, 2020) -- MonkeyBread Software today is pleased to announce MBS Xojo Plugins 20.5 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 2800 classes and 71,000 documented features, and the versatile plugins have gained more new functions:

Recently Microsoft released the newer WebView2 control for Windows 7 and newer. This is a new control to provide a web viewer inside applications based on Edge/Chrome engine. Use our new WebView2ControlMBS control if you need newer JavaScript or CSS compared to older Internet Explorer engine in HTMLViewer or the Chromium version offered by Xojo. Currently your users will have to install WebView2 control, but future Windows versions will include it.

If you are interested in Machine Learning, please check our new WindowsML classes for Windows. Beside the CoreML classes on macOS, we now can do similar things on Windows like detecting the primary object of a picture.

The new plugin embraces DateTime class and adds over 200 new methods and properties. In newer Xojo versions you can use DateTime or Date class, but in older Xojo versions only Date functions are available.

DynaPDF got updated and now supports more ZUGFeRD 2.1 and Factur-X variants. The new InsertBarcode function helps to place vector graphics barcodes on the PDF pages. You can now detect whether the user cancelled PDF print dialog on Windows. In that dialog you can now use collate and copies options. We support LineDash, LineJoin and LineCap for drawing with graphics class.

We improved the handling of unsigned integers with our variant related functions. We got new constants for GetVariantTypeMBS function for unsigned integers. To create arrays from values with specific types, we got ArrayInt64MBS, ArrayStringMBS, ArrayVariantMBS, ArrayIntegerMBS and ArrayDoubleMBS functions. The CompareNumbersMBS function helps to compare signed and unsigned integer values of any size correctly.

For XL classes we got a new function to copy columns in a sheet. Our new ReadValue function can read a value from a cell and return it as variant depending of the cell type.

The SQL plugin can now report last insert ID for CubeSQL. The PostgreSQL plugin part loads LDAP libraries if needed dynamically.

The SSH2ChannelMBS class got a DataAvailable event and a new example for an interactive Terminal.

Finally we updated CURL library to version 7.73.0, DynaPDF to 4.0.44.123, freetype to 2.10.4, LibXL to 3.9.2, OpenSSL to 1.1.1h, SQLAPI to 5.1.3b3, to a newer plugin SDK and Xcode to version 12.1.

See release notes for a complete list of changes.

Boolean Variant Optimization in Xojo


Did you know that Xojo runtime optimizes boolean variants?

Variants are used a lot with Dictionaries, Introspection and as RowTag/CellTag/ColumnTag in Listbox. They need to be fast.

Take an example code like this:

Dim ObjectCountBefore As Integer = runtime.ObjectCount Dim v1 As Variant = True Dim v2 As Variant = False Dim v3 As Variant = True Dim v4 As Variant = False Dim v5 As Variant = True Dim v6 As Variant = False Dim ObjectCountAfter As Integer = runtime.ObjectCount Dim difference As Integer = ObjectCountBefore - ObjectCountAfter MsgBox Str(difference)

We check object count, create six local variables of type variant with assigning boolean values. Then we check object count again. What difference do you expect?

You may expect six, but the Xojo runtime actually optimizes this and returns the same two variants again and again. Beside the first two boolean variants created, there is no more memory used for variants. Think about that, when storing booleans in a dictionary or as a RowTag.

Even better would be if functions like the one used to create a boolean variant would be annotated, so LLVM could optimize away the calls above with the unused variables and give a difference of zero.


MBS Xojo Plugins, version 20.5pr10


New in this prerelease of the 20.5 plugins:
  • Changed WindowsHTMLViewer plugin to not need VCRuntime140_1.dll any more.
  • Added SystemSymbolName property for ICDeviceMBS class.
  • Fixed a problem with loading libiconv.dll on Windows.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

Extract the system libraries on macOS Big Sur


On macOS Big Sur we can load libiodbc, libiconv and other open source libraries just fine, but where are they?

The folder /usr/bin has only a few symlinks, but not the real library files.


Fellow Thomas Tempelmann pointed me to a blog post from Jeff Johnson (who made StopTheMadness!) about Extract the system libraries on macOS Big Sur. And this article informed us how to get the libraries extracted.


The steps are quite accurate, but for Xcode 12.2, I had to adjust a bit.

  • Download dyld-733.8.tar.gz from Apple OpenSource website.
  • Select target to build only dyld_shared_cache_util and not the other stuff.
  • Changed SDK to macos.
  • In dyld.h we change __API_UNAVAILABLE and __API_AVAILABLE defines to not do anything.
    #undef __API_UNAVAILABLE
    #define __API_UNAVAILABLE(...)
    
    #undef __API_AVAILABLE
    #define __API_AVAILABLE(...)
  • In Diagnostics.h we add C declarations for SIMPLE string:
    extern "C" {
    
    typedef struct _SIMPLE*    _SIMPLE_STRING;
    extern void                _simple_vdprintf(int __fd, const char *__fmt, va_list __ap);
    extern void                _simple_dprintf(int __fd, const char *__fmt, ...);
    extern _SIMPLE_STRING    _simple_salloc(void);
    extern int                _simple_vsprintf(_SIMPLE_STRING __b, const char *__fmt, va_list __ap);
    extern void                _simple_sfree(_SIMPLE_STRING __b);
    extern char *            _simple_string(_SIMPLE_STRING __b);
    }
    Further down, change void* buffer variable to _SIMPLE_STRING _buffer = nullptr;, so the _buffer variable has a type.
  • In MachOLoaded.cpp comment out all corecrypto includes.
  • In Diagnostics.cpp we comment out _simple.h and libc_private.h includes. We could have put above definitions into a _simple.h file instead of course. Further down we change abort_report_np to have extern "C" in front to avoid link error.
  • In Closure.cpp we comment out corecrypto includes and System/machine/cpu_capabilities.h include. In hashBootAndFileInfo further below we change the #if to #if 0 to disable the block.
  • Finally build it and run it in terminal: dyld_shared_cache_util -extract ~/Desktop /System/Library/dyld/dyld_shared_cache_x86_64

For all you out there, here is my copy with modifications and the built command-line tool (x86_64 + arm64). No warranties as I have no idea whether the commented out code has side effects: dyld_shared_cache_util-dyld-733.8.zip


macOS Big Sur arrived


Yesterday Apple released macOS Big Sur to the public. As far as we see our software seems to work just fine. If you have an issue, please contact us soon.

As usual we recommend to wait with the update for another .1 or .2 release and only put it on production computers once you verified all your software works.

For Apple Silicon, our software should run fine in Rosetta for now. We will provide updated plugins and applications over the next months based on request. But first we wait for Claris Inc. and Xojo Inc. to update their host applications.

We already have a few Big Sur specific functions coming in the plugins and if you need something, please let us know.

PS: If your license has expired maintenance, feel free to order an update to extend it. If you need a new license for our plugins (or Xojo), you can get a trial now and order the license around Black Friday.

MBS Xojo Plugins, version 20.5pr9


New in this prerelease of the 20.5 plugins:
  • Updated Xcode to version 12.1
  • Fixed a few memory leaks with ABPickerMBS class.
  • Added asDateTimeValue to SQLValueReadMBS class to return DateTime object.
  • Changed WindowsML plugin to not need VCRuntime140_1.dll any more.
  • Please note that ChartDirector, WebView2, WindowsHTMLViewer, WindowsStore and XMP plugin parts need VS 2019 runtime.
  • Updated DynaPDF to version 4.0.44.123.
  • Updated SQLAPI to version 5.1.3b3.
  • Fixed some issues with DateTime handling from pr7.
  • Added new constructors for IEWebBrowserMBS, IENavigatorMBS and IEHistoryMBS to take a HTMLViewer.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

MBS Xojo Plugins, version 20.5pr8


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

Xojo Developer Magazine 18.6


The November/December (18.6) issue of xDev Magazine is now available. Here's a quick preview of what's inside:

Writing Better Code by Christian Schmitz
This is a great collection of programming tips, from how to write comments, limiting the scope of variables, handling errors, advice on method length, and much more.

OOP Listbox (Part 4) by Markus Winter
What Markus had planned to write changed when the folks at Xojo surprised him with a new listbox feature: customizable headers. Now he updates his project.

Get Ready for Git by Justin Elliott
Using a version control system can be intimidating, but in this guide for Xojo developers, Justin takes you step-by-step into the world of Git and makes it painless.

MapKit (Part 7) by Markus Winter
This time Markus shows us how to use customized annotation views in Apple's MapKit in Xojo.

Toolbar Quick Tip by Markus Winter
Did you know that if you create a subclass a Toolbar you can no longer add buttons to it in the IDE? Fortunately, Markus found a solution to this odd problem.

PLUS: Creating PDFs with Xojo, Xojo 2020 Release 1.2, SQLite 3.31.1, Best of the Web, and more!

MBS Xojo Plugins, version 20.5pr7


New in this prerelease of the 20.5 plugins:
  • Added Added WebView2ControlMBS for Microsoft WebView2 control.
  • Added about 200 methods and properties with DateTime instead of Date objects to pass timestamps. Those are hidden if you use the plugin in Xojo 2019.1 or older.
  • Renamed asDateTime to asSQLDateTimeMBS in SQLValueReadMBS class as we now added asDateTime as DateTime there.
  • Changed playerSeekToDateFinished and playerItemSeekToDateFinished events in AVFoundationMBS class to pass date parameter as variant as it may be a DateTime or Date depending on what method you called before.
  • Changed properties in NSDatePickerMBS and NSHTTPCookieMBS classes to be debugger visible.
  • Updated SQLAPI to version 5.1.3b2 with newer 64-bit Informix support.
  • Updated LibXL to version 3.9.2.7.
  • Changed PrintPDFFileWithDialog and PrintPDFPageWithDialog methods in DynaPDFMBS class to tell printer dialog that we are okay with collate and copies, so that option may get enabled on supporting printer drivers.
  • Added 60 second timeout to JavaScript evaluate in WKWebViewMBS class for macOS to avoid endless loops.
  • Fixed a deadlock with Evaluate in WKWebViewMBS waiting endless for JavaScript answer and newer macOS versions.
  • Added PrintCancelled property to DynaPDFMBS class to distinguish between error and cancellation.
  • Updated to newer plugin SDK.
  • Fixed a bug in OpenSSLMBS.VerifyData where it reported an error in reading key.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

WebView2 for Xojo


The last days we played with the new WebView2 control from Microsoft. This control allows any Windows application to use the Chrome based Egde browser as a control within your application. Enjoy all the latest JavaScript, HTML and CSS features and replace use of Internet Explorer.



Please visit the WebView2 website and download the WebView2 Runtime installer there. There is a single installer to download whatever platform you are on or just get the Windows 32 or 64-bit Intel full installers. The control may come pre-installed for future Windows 10 versions, but currently all clients have to install it for Windows 7 and newer.

For next MBS Xojo Plugins version 20.5 we add a WebView2ControlMBS control, which you can drop on your window in a project. If run on Windows, the control will try to load WebView2 and put it in a control. Please try the example project soon with new plugins.

This includes various settings, a dozen events, run JavaScript or call back from JavaScript to the control via web messages. Show developer tools or add JavaScript to run on each website. We may add more things over time, but the first version is set and will be available tomorrow.

Please do not hesitate to contact us with questions.
The biggest plugin in space...

Archives

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