Our Blog, FileMaker only, Xojo only, Archive (older)     Follow us on Twitter, Xing, LinkedIn or Facebook.

Programming your own Solar System with Xojo + MBS SceneKit


Stefanie wrote another blog post for the official Xojo blog:



Programming your own Solar System with Xojo and MBS SceneKit

If you join Xojo Connect conference next month, please come to Stefanie's presentation: Scenekit - Stefanie Juchmes, 4 pm on 26th March. Please don't hesitate to send us questions.

Upgrading WebKit for Windows support


As you may have seen Xojo 2019r3 uses a newer version of Chromium Embedded Framework for WebKit support on Windows. For us this means we have to put the upgrade of our Chromium plugin classes on the todo list.

For MBS Xojo Plugins 20.1 we upgrade our Chromium classes. You can try it with the recent 20.1pr4 pre-release version.

The changes include a few fixes for ChromiumCookieManagerMBS and ChromiumWebPluginInfoMBS class which both had crashing bugs, but seem to work fine now. You guys can be happy to use a high level language like Xojo where the compiler always makes sure your delegates have the right parameters as any mismatch can cause hard to track bugs later. Luckily we fixed it and now leverage C++ compiler to test those, too.

With newer plugin you can use Chromium with all Xojo versions since the introduction of WebKit support. We now support 3 different versions of the Chromium Embedded Framework used by Xojo with the same plugin. When you start using the plugin classes, we check which CEF version is used and use the right function pointers. Enjoy!

MBS Xojo Plugins, version 20.1pr4


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

Improve your work live balance with do not disturb


To improve the balance between work and live, some simple things can help:

First, it's a great idea to set a rule in the household to have no phones for meals. So I just leave my iPhone in the office, so it doesn't grab my attention. Some families have baskets for the phones so when you enter kitchen, you put it there. We'll see if we do this when our children get older and we get more devices.

Next figure out the time you allow others to disturb you. The default setting for iOS is to be silent between 22:00 at night and 7:00 o'clock in the morning. Now it seems to work better for me to move those times to 20:00 and 9:00 o'clock. In the morning I may get up long before 9, but to get ready, have breakfast and read through emails, it may be 9 when I am ready to take calls.

For the evening it's difficult alone to get away from work and not work till midnight, but at least the iPhone won't disturb me when I am busy doing some focused work, or watch a movie with my family.

What do you do to get some rest from screens?

Multithreaded plugin functions can increase speed of Xojo application


Have you seen the "NSImageMBS multithreading" or "Threaded Encryption and Hashes" example projects in Xojo?


Do you notice that with 4 Xojo threads, the plugin can actually get 4 CPU cores busy and get work done faster?

Over the last releases we added quite a few MT methods. Those are plugin methods which perform work on a preemptive thread. The Xojo thread calling them yields CPU time to other threads while it waits for the preemptive thread to finish work. And if you use several threads in Xojo already, this will help you keep more CPU cores busy. (more)

Building slides for Xojo.Connect


As a speaker you should now take the time to prepare slides a month before the XOJO.CONNECT conference in Nashville, Tennessee, USA.
What is your favorite MBS Plugin feature from the last 12 months we should highlight?



It will be held March 25-27, 2020 in Nashville, TN at the Sheraton Music City Hotel. This conferences is the best place to meet Xojo developers from around the world in real live, make contacts, present yourself as expert and learn what is new in Xojo. Tickets are available in the Xojo store and if you bring your partner, you can order an extra guest ticket for the dinner events.

Check out the conference highlights video if you want to see what it's like - or ask one of the many attendees from the forum!

Wether you are full or part time Xojo developer, this is your chance to learn all about the Web 2.0 framework, the Android progress and what's new in the Xojo world.

MBS Xojo Plugins, version 20.1pr3


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

Customized File Open and Save Dialogs for Windows


This week, I learnt a lot about the APIs from Microsoft for open and save dialogs. For Xojo we got new WinFileOpenDialogMBS and WinFileSaveDialogMBS classes. Both are based on WinFileDialogMBS class and report errors via WinFileDialogExceptionMBS. To return items, we use WinShellItemMBS class and WinShellItemArrayMBS for a list of items. To define file types, we got the WinFileTypeMBS class. The dialog may look like this:



We customized the title, the OK button, the label for the file name and added a list of file types to fill the file types popup menu. As you see there are custom controls on the dialog with two text fields and a checkbox with a popupmenu below. We added a lot of events for the WinFileDialogMBS class, so you not just learn about changed selections, folder changes, but also about events to custom controls. In the CheckButtonToggled event as an example we can react on the checkbox and enable/disable the popupmenu below.

While most people are happy with the built-in OpenFileDialog and SaveFileDialog classes, our plugin classes offer many more features for Windows specific projects. Please check NSOpenPanelMBS and NSSavePanelMBS classes for MacOS to do similar things. And we still have OpenDialogMBS as a cross platform class.

The example project with a lot of settings:



Please try soon with next prerelease of MBS Xojo Plugins 20.1.

Our JavaScript engine, a game changer


Yesterday Sean Beach, one of our clients in New York emailed me back about our JavaScript integration. To quote him:

"Wanted to follow back and say that this plugin is a game changer for my showcontrol product. Thanks so much!”

The discussion was about our JavaScript functions and a couple of his questions got answered in our Tips for our JavaScript functions blog post:

"This document is fantastic, and actually answers most of my questions from the previous email."

We are delighted about the feedback we got!

The same day Stefanie got two of her latest articles published about using JavaScript to calculate distances.

On our FileMaker blog the version using our FileMaker Plugin:
FileMaker and JavaScript - the perfect combination

And even on the official Xojo blog an article about our Xojo class to run JavaScript:
Xojo and JavaScript – A Perfect Combination

We are happy to see that our JavaScript integration is so well received by clients from around the world. And it just started with a hint from one user in early December to take a look into this topic.

Check out the JavaScriptEngineMBS class for Xojo and the JavaScript functions for FileMaker!

20 Years Monkeybread Software Party


This year in April our company will turn 20 years old.
We'll plan to have a big party here in Germany near our office with over 100 guests.

Today we send invitations to guests who have not yet responded.

If you like to join and you miss an invitation, you can contact us and ask whether your invitation got lost.

As people confirm they are coming, we'll add them to the guest list. If we run out of space, we may put people on the wait list.
If you can't make it, please respond soon, so we don't need to contact you again later.

MBS Xojo Plugins, version 20.1pr2


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

Airplay related classes for AVFoundation


For MacOS, we add AVRouteDetectorMBS class to detect if multiple routes are available, e.g. for Airplay.
And for MacOS 10.15 we add AVRoutePickerViewControlMBS control to show the standard control from Apple to select the output device:



If you have an Airplay enabled device, it should show up in the popup menu.
Our example project uses AVRouteDetectorMBS class to detect if multiple routes are available. If that is true, we show the AVRoutePickerViewControlMBS control and let the user pick the destination for the current video player.

Tips for our JavaScript functions


Here a few tips we recently learnt for our JavaScript engine based on Duktape in the MBS Plugins for FileMaker and Xojo:
  1. Use performance.now() to get time within JavaScript and measure how long something takes. Here an example where we measure how many milli seconds it takes to run a loop one million times:
    function testFunction() {
        for (var i = 0; i < 1e6; i++) {}
    }
    
    var t1 = performance.now();
    testFunction();
    var t2 = performance.now();
    
    Print('test took: ' + (t2 - t1) + ' milliseconds');
  2. All global functions and properties in JavaScript are attached to the global object. You can access them explicitly via globalThis keyword.
  3. List global properties via JavaScript:
    Var list = Object.keys(globalThis);
    The list will include all global names including functions like Print registered by MBS Plugin.
  4. Check Duktape.version for the version number. If we update the engine, you can check the version number and compare. Currently the value is 20500 for version 2.5.
  5. Use unicode escapes in strings if needed to mask special characters. While the engine handles UTF-8 fine, you can escape some characters with \u followed with a hex 4 digit number, e.g.
  6. n = '\u0041';
    Which will assign "A" to variable n.
  7. Use built-in functions to encode text as hex or base64 via Duktape.enc:
    Duktape.enc('base64', 'Hello')
    This returns "SGVsbG8=".
  8. Use Duktape.dec and TextDecoder class to decode base64/hex encoded text to UTF-8 string:
    var result = new TextDecoder().decode(Duktape.dec('base64', 'Zm9v'));
    Result is now a variable with text "foo".
  9. Access call stack with Duktape.act function. Query Duktape.act(i) with various values of i. Pass -1 for the act() call, -2 for the current function and -3 for the caller of current function. The returned object contains properties for lineNumber and function. When you query function.name, you get the name of the function.
  10. Add console object if needed. You can add a console object and include a log function, which sends arguments to a Print function:
    console = { log: function() { Print(Array.prototype.join.call(arguments, ' ')); } };
  11. Provide environment some JavaScript may need. If some JavaScript expects a global window object to store something, you can simply create a dummy one:
    window = {};
    This may not provide functionality, but allows at least code to check for this to work.
  12. Prefer functions over evaluating code. Code in functions is parsed and uses registers for the virtual machine, while code evaluated may use named variables, so if you can put your code in a function and just evaluate the function call, things may execute a bit faster.
  13. Be aware all numbers in JavaScript are doubles. Evaluate "9999999999999999" and you get "10000000000000000" back. Comparing numbers may not give the result you expect as "0.1+0.2==0.3" evaluates to false.
If you have questions, please do not hesitate to contact us. See also JS.Evaluate and related JavaScript functions in MBS FileMaker Plugin and JavaScriptEngineMBS class in MBS Xojo Plugins.

17 Years Xojo Developer Magazine


Did you notice that over the last 17 years we got 103 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 103 back issues with 7360 pages in total including 400 pages mentioning MBS classes, modules or controls. Check the Welcome to Xojo bundle for new users.

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

Comparing JavaScriptEngineMBS to XojoScript


Let's compare a bit XojoScript built-in to Xojo to JavaScriptEngineMBS class in MBS Xojo Tools Plugin. What are differences and benefits for both?

XojoScript is the scripting engine provided by Xojo and is heavily used in Xojo for IDE scripting. You can use it in your projects, compile code at runtime with a reduced Xojo language and the run it. With context object you can provide your own methods and properties and use them in the scripts. While you can precompile and then run several times, there is no way to store the compiled code anyhow. There is only one source piece containing all the code, so you can't just predefine some routines outside source.

On the other side we have JavaScriptEngineMBS, which uses Duktape library to provide a ECMAScript engine. So the language is JavaScript and there is built-in functionality for text, array and JSON functions. You can just pass some JavaScript from your user to the engine and let it execute. Our plugin allows you to set/get global properties in the JavaScript memory. With XojoScript you would have to predefine variables either in context object or in the source code. For JavaScript you can define your own functions to be used in the script by calling AddFunction method, so you don't need to know those at compile time and you can load them from a database at runtime. You could load a JavaScript from your user and let them write functions which you call with our CallFunction function. Finally like the XojoScript context object you can use Xojo methods to define JavaScript functions via delegates and have JavaScript call back to your Xojo application.

The JavaScript is evaluated at runtime, it may be parsed before running, but it is not compiled into machine code as with LLVM compiler in XojoScript. We don't expect anyone to notice the difference unless you do some heavy calculations. The JavaScript function definitions in Duktape can be exported as a BLOB and stored in binary notation in a database. See SaveFunction and LoadFunction methods in JavaScriptEngineMBS class.

As we don't know your use case, the decision which to use can be difficult. XojoScript has the big advantage that it's built-in and uses the same Xojo language you know about. But your users may be more familiar with JavaScript, so our plugin may be a good choice, too. As our JavaScript doesn't need to be defined as much at compile time, you can invoke it more dynamically. Like loading your context functions from a database and installing them at runtime and loading global properties from database and registering them via code. Finally you can add functions to call methods on different objects via delegates, so some methods you offer can go to the app object, some to the current window and others to your Xojo class for the data model you have.

If you have questions, please don't hesitate to contact us. See also New in the MBS Xojo Plugins 20.0

MBS Xojo Plugins, version 20.1pr1


New in this prerelease of the 20.1 plugins:
  • Added LTCMBS and related classes to encode/decode timecode.
  • Added Read and Write methods and ReadAvailable and WriteAvailable properties to PortAudioStreamBaseMBS class and removed them from PortAudioStreamMBS class.
  • Added isValidDateInCalendar and isValidDate for NSDateComponentsMBS class.
  • Added dateFromComponents, componentsInTimeZone, dateByAddingComponents to NSCalendarMBS class.
  • Updated NSDateComponentsMBS class to have debugger visible properties.
  • Updated DynaPDF to version 4.0.37.103.
  • Fixed buffer overrun in BytesToKey function in CipherMBS class.
  • Fixed BacktraceMBS to work again in console and web projects.
  • Fixed a bug in ShellMBS class when running applications on Windows with empty ApplicationName.
  • Added JavaScriptDateComponentsMBS class.
  • Added DateComponentsToTime, TimeToDateComponents and Now methods to JavaScriptEngineMBS class.
  • Updated SQLite to version 3.31.0.
  • Updated curl to version 7.68.0.
  • Documentation now includes references to Xojo Developer Magazine articles in html and PDF.
  • Added Navigate method for IEWebBrowserMBS class to pass headers and POST data with loading URL.
Download: monkeybreadsoftware.com/xojo/download/plugin/Prerelease/.
Or ask us to be added to our shared Dropbox folder.

Xojo Developer Magazine Links


Our documentation now links to issues of the Xojo Developer Magazine.
For each class/module/control, we link to relevant articles, so you can quickly find them.

e.g. if you scroll down on the page for DynaPDFMBS class, you find listed methods and properties using this class, example projects, blog entries and new the list of articles in Xojo Developer Magazine referencing this function.

We hope this makes live easier for those using MBS Xojo Plugins and subscribing to the Xojo Developer Magazine.
Even if your English is not perfect, you may want to read it as the Magazin is a big treasure with the back issues from 18 years.

In total we reference the magazine from 290 items with 400 relevant pages. Enjoy!

Ideas wanted for surprise MBS feature for Xojo.Connect


Last year we presented our DynaPDF graphics class integration, a feature we worked on a few weeks before the conference in secret (see presentation video here). Beside the normal support requests and preparing the session slides that was a bit of extra work each day. The presentation file, I submitted before the conference, did miss the new special slides and I added them just before the presentation to make sure I didn't leak the news myself.

For Xojo.Connect 2020 in Nashville this year we look for a new idea on what to present as a surprise. Not sure if we find a compelling idea. It should be something which is useful to a large portion of the user base and not a feature for a you alone or a handful of people. And it should be plugin feature, so not a wish for iOS extension or some grid with containers as that is better written in Xojo directly.
Do you have ideas? Please email us.

I would also encourage the Xojo team to take a week before XDC, look through feedback cases and maybe let every Xojo engineer pick an annoying bug, a little feature request or something they'd like to see or have and spend some time onto this. Especially as a lot of feedback cases never come to the top 100 list and never get attention of the management. The in the keynote Geoff could present that list and maybe demonstrate those improvements. Those items would be first hand news shared with the crowd. Finally for the last session, if something got fixed at the conference, present it there. I did this before at a conference where I had a short lightning talk on the end and could show a new feature I programmed at the conference.

One of the feature I would do as a developer on the compiler is to make sure it annotates the nil object checks and out of bounds exceptions as far as possible with details like line numbers or name of variable. Not for all cases of course, but the functions to raise this exceptions could be overloaded and when the LLVM frontend for Xojo parses the lines and adds the checks, it could include the parameter with line number if it knows them.

Xojo Web 2 Progress


As a Xojo developer, do you use Feedback application to report bugs and feature requests?
Did you notice in the recent section that a lot of feature requests got marked as implemented for Web 2.x?



Seems like there is a quite a bit of WebAPI 2.x progress and I am looking forward to Xojo.Connect conference to learn the details!

We expect a beta version to be ready either at the conference or shortly after it. At the conference for attendees would be great because if we all download and play with it there, we may report bugs and show them directly to Xojo staff so they could be fixed at the conference.

Two months till Xojo.Connect 2020 in Nashville


Just two months till the XOJO.CONNECT 2020 in Nashville, Tennessee, USA. Tickets are still available for $999 USD.



It will be held March 25-27, 2020 in Nashville, TN at the Sheraton Music City Hotel. This conferences is the best place to meet Xojo developers from around the world in real live, make contacts, present yourself as expert and learn what is new in Xojo. Tickets are available in the Xojo store and if you bring your partner, you can order an extra guest ticket for the dinner events.

Check out the conference highlights video if you want to see what it's like - or ask one of the many attendees from the forum!

Wether you are full or part time Xojo developer, this is your chance to learn all about the Web 2.0 framework, the Android progress and what's new in the Xojo world.

Older blog entries:

2020-01-23 New in the MBS Xojo Plugins 20.0
2020-01-22 Xojo Workshop in UK
2020-01-21 Xojo developer meeting in New York City
2020-01-19 Transactions in MBS Xojo SQL Plugin
2020-01-15 Xojo Meeting in Berlin
2020-01-14 MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0
2020-01-13 Xojo Developer Conference 2020
2020-01-13 Individual licenses for MBS Xojo Plugins
2020-01-11 MBS Xojo Plugins, version 20.0r8
2020-01-08 MBS Xojo Plugins, version 20.0r7
2020-01-06 MBS Xojo Plugins, version 20.0r6
2020-01-05 Evaluate JavaScript for web viewer in Windows
2020-01-04 Array size allocation in Xojo
2020-01-04 Whether to order updates or not
2020-01-03 MBS Meeting in Netherlands
2020-01-03 xDev 18.1 Issue
2020-01-02 MBS Xojo Plugins, version 20.0r5
2020-01-01 Welcome 2020
2019-12-31 Upgrading our HTMLViewer functions for Internet Explorer
2019-12-29 Three days till year's end

Archives

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
XML: RSS Feed XML: Atom Feed