Window containing vertical Slider won't open on macOS 10.10.5 or 10.11.1 when built with Xojo2021r2.1

Firstly, the window not showing is normal behavior since macOS 10.14. You need to enabled “NSApplicationCrashOnExceptions” to figure out why!

I took a look at your case and code. If I may make a suggestion with your declares.

#if TargetMacOS then
  #if xojoversion < 2021.2 then
    declare sub NSSlider_setVertical lib "AppKit" selector "setVertical:" ( NSSliderInstance as integer, value as boolean ) // --- OS X 10.0 +
    NSSlider_setVertical( me.handle, true )
  #endif
#endif

This way the declare documents itself. So when / if Apple decide to change this in the future, especially when all Mac apps move over to UIKit, you have references here to look up the original documentation or header files and hopefully figure out what it is that you need to replace it with.

I’ve tried it with and without the declare and it crashes. Enabling the NSApplicationCrashOnExceptions, reveals that it is crashing with the error that “[XOJSlider setVertical:] is unrecognized.” According to Apple’s Docs it has been since 10.0 +

Setting the slider so it is 100 x 23 in the IDE and then flipping the dimensions in code appears to work.

I’ve dug into the Xojo Runtime on 10.10 and sure enough the setVertical: function is not exposed, but it is on macOS Big Sur. I don’t know if this is an Apple thing or a Xojo thing.