I am testing my desktop app on Windows after getting it working on macOS. I check to see if a Class (CommonUsers) has been instantiated by checking if it is Nil and, if it is, I will instantiate it. The Class is on a WebContainer (User and Users) that is on a WebPage (WinUsers).
What is weird is that it gives an UnsupportedOperationException ‘Only for 64-bit Mac apps.’ Checking other similar Classes on WebContainers on WebPages work fine.
I have code to raise this exception with that message in MBS Plugins six times.
All related to accessing objects for Contacts framework, which is Mac 64-bit only.
I have a Document Window called WinUsers. On it is a PagePanel with three panels, each holding one Container: one with a generic list of all Users (called Users), a specific one with the single user we are currently editing (called User) and one with a generic Help display.
I have one class called CommonEditTable for editing the generic Users Container and another called CommonUsers for editing the specific user data. I have them in an external class so they can be used for both desktop and Web apps.
I have about a dozen windows that act this way and they work identically (based from a common window core) and all work fine except three (Users, Employees and Contacts).
Even doing a WinUsers.Show gives the same Exception and the Open Event of the windows is never run. Even surrounded with a try…end try command, the app still crashed from that line.
If it’s not MBS-related, check the advanced properties for which platform the class(es) is supposed to be included in? I don’t think that message is quite so well put, but it’s worth a check.
It could be. @Christian_Schmitz did say above that he has this exact message in his plugins for Contacts. I’d use a different name if his plugin is registering just plain “Contacts” within your project.
I wonder whether you have some constructor, which is called when you access the property.
e.g. the window is newly created, which may create a CNContact*MBS class.
I have enclosed all the code in #if target macOS then…, but it still has the issue by the mere presence of the ClassCNContactPickerMBS class on the page. I cannot set it to macOS only.