Xojo 2016 Release 1 was released today. This much anticipated version is all about Retina and HiDPI display support. In addition to that, there are, as always, the usual mix of new features and bug fixes. Let’s get to it!

The IDE is Retina Aware

The IDE itself is now Retina capable and all of the icons and images used in the IDE have been replaced with high resolution images. On my 27 inch 5k iMac it’s quite a noticeable difference to my aging eyes: everything is very sharp. As with many apps once you start using the high resolution version it’s hard to go back to a lower resolution.

Before you jump into this version you might want to do some testing. On relatively new iMac the Web Layout Editor is very slow. So slow as to be almost unusable. This only happens on existing projects since new projects seem to work just fine. Perhaps it’s a combination of project size and/or web page complexity or number of Web Containers. I really don’t know but I’ve submitted a Feedback report showing the symptom and an application sample from Activity Monitor.

Your Apps Can Be Retina Aware

In the last Xojo version we were introduced to ImageSets and that feature is now more useful in 2016 Release 1. The ImageSet allows you to add a normal sized image (1x), a 2x image, and also a 3x image. Mac OS X only uses the 1x and 2x images but some Windows 10 resolutions will use the 3x image.

HiDPI support for Windows is officially beta and I believe that’s mostly because the various versions of Windows that Xojo supports all do HiDPI slightly different. Currently Xojo does not support Window 10’s per-display scale factor and will use the scale factor of the screen it was launched on. TextArea’s only display in large size, the HTMLViewer and MediaPlayer is not scaled, BevelButtons don’t display, and Image Set Icons do not appear correctly in toolbars. Obviously this is less than ideal for Windows applications and you probably don’t want to release a Windows app with this set.

With Retina/HiDPI support is a new Application shared property called SupportHiDPI. When set to true, Xojo will build your application with Retina and HiDPI awareness. When set to false it will build apps that worked the same was as previous builds. Sadly, this property cannot be changed at runtime because it would make enabling it for Mac OS X a no brainer but leaving Windows as is.

As you can imagine, Retina/HiDPI changes a number of important things. The Picture class has a new constructor that can take one or more bitmaps in addition to its size. All bitmaps must have the same aspect ratio or an invalid argument exception is generated. One question that I’ve not explored for myself is how exact this ratio must match. What is the precision on this check?

The graphics object now has a ScaleX and ScaleY property. For pictures the scaleX/Y are always set to 1, but a graphics object passed in from the paint event might have a ScaleX/Y set to 2 on a Retina display. Graphics.Pixel is now deprecated (NOT REMOVED).

Windows have a couple of changes too. There is a new event ScaleFactorChanged on Mac OS X that is an indicator that all graphics for that Window should be invalidated. A read only ScaleFactor tells you what the scale factor is for this window. The Canvas object has a similar ScaleFactorChanged event on Mac OS X as well.

Local Language Reference

Retina is not the only new thing in R1. The Local Language Reference has been revamped again and if you are a Dash user you’ll notice that it shares much of the same look and feel. Searching for an item in the Language Reference, in my opinion, is considerably easier in this new version and I find I like it better than the online version. Besides being able to search for any event, property, class, enum, etc the local language reference allows you to go back through your search history rather quickly.

Web Framework Changes

The web framework received a number of important changes. Perhaps the biggest and most important to web users are that WebStyles have changes their implementation. The change notes say “User defined WebStyles now have more specificity than framework applied styles.” which I have been lead to believe means that WebStyles now work properly in all cases as there were fringe cases where styles were either ignored or improperly applied. During the beta cycle Xojo asked us to test web apps to make sure nothing broke. In my testing I didn’t see any issues.

The connection type of a web app can now be set with a command line option. The WebListBox received some love too.

Miscellaneous Fixes

Build times have been improved.

Xojo.net.httpsocket now works in Mac OS X console and web applications.

A memory leak in NSWindow was fixed in the Cocoa framework.

The FileTypes editor has received a number of bug fixes and changes.

40 changes to the documentation and examples.

Conclusions

With all of this work on Retina/HiDPI applications for Release 1 I am disappointed at the lack of project examples for HiDPI and Retina. Sure, the SupportHiDPI is an easy thing to do, but for many of our applications that create images on the fly we are only left with some fairly vague instructions. A Xojo Blog posted today http://blog.xojo.com/a-journey-of-a-thousand-pixels might be your best bet in understanding some of these changes in more detail but even I scratched my head with some of the implementation details. Actual example code that show the practical implications of Retina/HiDPI and creating images would have been very welcome.

I’m relatively happy with 2016 Release 1 though not without some reservations. Since the number of Windows controls in HiDPI that don’t scale properly is fairly large it’s not ideal that you can’t turn off HiDPI for Windows but keep Retina on for Mac OS X. Sure, you can always do two builds but it’s not an automated option. Performance issues with the Web Page Editor is also troubling and perhaps this means there’s a dot release in our near future.

There are quite a few things on the horizon that Xojo needs to tackle. Full debugging in 64 bit and a 64 bit IDE is perhaps the biggest one and the HiDPI stuff is surely a distraction from that important requirement. This beta cycle was really long and it makes you wonder how much their schedule has shifted just to get HiDPI (mostly) working with some obvious work still to do.

What are your thoughts on Release 1?