Visual Studio for Mac was recently released. In a previous post I compared how much easier it is to make native Mac apps with Xojo than with Visual Studio for Mac. Now I’d like to talk about making cross-platform desktop apps.
If you are a Mac or Linux web or cross-platform developer, one of the easiest ways to test your apps on Windows is to use a virtual machine. And you can test Windows in a VM completely for free by using the test VMs provided by Microsoft.
At the recent Build conference, Microsoft released the final version of Visual Studio for Mac. As a former Visual Studio developer who left that world for the fun, fast development that is Xojo, I had to check it out to see how it compares to Xojo.
First, if you’ve ever used Visual Studio on Windows before, be aware that Visual Studio for Mac is not the same thing. Essentially Visual Studio for Mac is new branding for Xamarin Studio (Microsoft bought Xamarin in 2016), so Visual Studio for Mac looks and works nothing like Visual Studio for Windows.
In Xojo we have constants that can be defined in code or added to modules, classes, etc. What you’ll notice about Wikipedia’s definition of “constant” is that it’s a behavior, not a specific type.
There is another way to define a “constant” or “a value that doesn’t change throughout the run of your application”.
The ContainerControl is one of the most versatile control classes included in the Xojo framework both for Desktop and Web apps. In fact, it paves the way to complex UI controls creation with the same simplicity you are used to while designing your window layouts. Even better, once you create your complex UI controls using the ContainerControl, you will be able to add them to your Window layouts as if they were regular controls. Plus, you will enjoy the fruits of better OOP encapsulation and the fact that you can create and use the controls dynamically at run time. Want to see this in action? Follow this tutorial and video to create the basis of a multiplatform search field based on the ContainerControl class. Continue reading ContainerControl: Making a Multiplatform Search Field
Server Ranger started life as a small in-house Xojo console project that I used to monitor servers for several clients. Rather than getting paged (in the very early days) or getting angry phonecalls from clients, it was much more pleasant to have my app play an alert on my Mac and send me an email to notify me of a server issue. With this heads-up, it was often possible to have the issue resolved before a client even realised there had been an issue.
Like many in-house solutions, the demand on Server Ranger increased over time and it became a more vital part of my business.
Xojo 2017 Release 1 includes support for running and debugging 64-bit apps right from the IDE for macOS and Linux. Windows support is noticeably absent. Why? The answer is a bit complicated but interesting.
Sooner or later your app will need to work with files, maybe to save the data generated with the app itself, to open the files created with other apps or because is the main purpose of the utility you are working on. Xojo gives you the class FolderItem fully loaded with a useful bunch of properties that allow you to examine the attributes of any file; for example, the creation or modification of dates, the file path (in several formats), if the file is an alias, etc. The FolderItem class also gives you the methods to do a lot of file operations without effort. Continue reading Working with Files: FolderItem
With all the Retina/HiDPI work done in the past few years, we’ve had to add some new features along with it. One of these newer features is the Graphics ScaleX and ScaleY properties. For the purposes of Retina/HiDPI, the scale factor is used when converting user space coordinates to backing store coordinates. While mostly integral on MacOS (unless originating from some code that’s probably not ours), it can vary on Windows, and perhaps arguably mostly fractional. This is because Windows allows you to set DPI scales at 125%, 150%, etc. So when dealing with fractional scales there are a few things to watch out for:
- Rounding issues
- Anti-alias effect
While the framework takes care of rounding issues, for the most part, the secondary issue of anti-aliasing is up to you.