As this is a cross-platform app, I have placed the AddHandler inside an external Class, also used by my Desktop, Web and iOS. I have adjusted your app to place the AddHandler code inside a Class that is added to Screen1, and my original error occurs (see app below). This AddHandler-from-a-class technique works for Desktop, Web and iOS.
Can you please confirm it also fails for you when called from the Class. If it fails and you have no other suggestion, I will create a Feedback report.
Yes, I also get the compiler error with your project. I lack a bit of imagination as to why you chose this approach, but that’s not the point here. You should create an issue.
Thanks again @Martin_T, BTW I need the Class to reduce code duplication in my cross-platform apps ie instead of four AddHandlers appearing, one in each of the Opening event of my Desktop, Web, iOS and Android projects, I have one external class to create the AddHandler once for all projects. Multiply this for every AddHandler and my savings are enormous. Plus, it works for Desktop, Web and iOS, so why not Android too?
Unfortunately, the Xojo debugger for Android doesn’t always return the correct error, but sometimes it returns the one you mentioned, leaving us alone.
My problem was that I had changed the name of the class.
from “ContMonth” to “ContMonths”, and I had left the sender with the old name “ContMonth”.
Xojo would try to compile and then give me the same error without giving me any guidance.
For now, with every change to the project, even a very small one, I try to compile, and if Xojo gives me that generic error, the problem is in the last change.