Thanks, I think I got it. With some supplemental code, it works like I would need it to.
But to my defense, in 2020r1 at least, this is really implemented weird. I mean, what you explain, while “it works” works just because you say it does (and you are right). Earlier, I looked at this and said to myself “string comparisons to determine numerics???”
I was burned in the past by this financially - I printed like 10,000 CD’s about 10 years ago that had programs that used Apple’s installer, which had a bug in it that screwed up OS comparisons once they hit 10.10, because Apple used string comparisons to compare numbers. (Not just Xojo!) Once 10.10 hit, the installers took 10.10 to mean 10.1. Had to throw out about 8,000 of the CD’s. Thanks, Apple. grrrr
In this case, I saw the System.VersionData.MajorVersion, tried it and got “Item doesn’t exist”. I tried obtaining a VersionData class instance, and I got some “Static object…” junk error.
It seems like only this System.Version mystery string comparison, and System.Version.ToString work in MacOS. (And the ToString returns more than the comparison, e.g. “macOS 10.14.6”) All that other stuff involving VersionData seems to be iOS only.
Forgive me if I didn’t want to compare strings in numerical contexts =) But I guess I have to, and it does work, but… why would this ever be implemented like this? I seems so easy right behind the curtain to simply allow MajorVersion/MinorVersion/etc. to exist? Sorry to complain, but this is yuuch, you gotta admit, to a function that couldn’t ever be called esoteric.