Xojo and macOS10.14 findings

Two days until the next xDev, which has an article about how to prepare your application for Mojave’s new dark mode.

@Sam Rowlands : xDev has already arrived in my inbox.

When you introspect these controls on their Mac side, you’ll find that there is a XOJTextField and a XOJTextView class, so they are basically native controls and should adapt to Dark Mode. But the TextFieldCell’s drawWithFrame:inView: method is overwritten, so that’s probably the place where the engineers could fix the behavior.

Labels could simply stay black because of their TextColor property being black usually. I think it would be best to address NSColor’s TextColor “constant” instead.

The only bigger deviations are obviously the Listbox and the BevelButton which are built on a view subclass. Again, the drawing routines should be changeable to use the system colors instead of default black and white.

Funny aspect: The Listbox headers under Mojave Beta are semi-transparent in a screenshot. They are pitch black on screen.

Sadly such info should be provided for free by Xojo Inc.

As a reminder: For those of you needing a quick fix for the Listbox header problem, and provided you also have a MBS plugins license, you can find a Listbox replacement class in the examples, called “ListboxTV”, which uses the native NSTableView class and simulates most of the Xojo Listbox on top of it.

I know Beatrix uses it successfully in a commercial app of hers, and I do, too.

And it even adds some new features that the Xojo Listbox does not offer, such as on-demand data provision for the rows, so that if you have 10000s of rows, you do not have to pre-fill them but only fill the ones that are currently showing. Can lead to great performance improvements.