Im encountering issues in un-deprecating. I have spent hours trying to debug a program that I started in a pre-R2 version, mostly updated in R2 to the new API to a working version, then spent hours un-deprecating it to run in R2.1. It is that last step that I think should have been mostly automatic, but instead took hours of effort.
Quoting from 2.1 release notes: 2019r2.1 — Xojo documentation :
Events have been reverted back to their pre-r2 names to make it easier to move between 2019r2.1 and prior versions. The IDE will automatically change any API 2.0 events back to the prior names when a project is loaded. If there are two events with the same purpose in a project (such as Open/Opening) they will be left alone so you can review the code and remove the now-unneeded additional event.
Could someone please translate that statement, especially the last two sentences?
Heres an example of a problem that I encountered where a project runs in R2, but if I open with R2.1, then I get this error message (and the project does not run):
Location: Window1.SelectColorButton.Pressed Declaration
Issue: SelectColorButton on Window1 implements the event “Pressed,” but its superclass PushButton has already implemented the event. Sub Pressed(index as Integer)
( In this example, "SelectColorButton is a control (with super Pushbutton , the standard button used in desktop apps) and is a member of a control set and is instantiated in Window1 three times with indices 0,1,2).
By my reading of the 2nd sentence from the release notes (“The IDE will automatically change any API 2.0 events back to the prior names when a project is loaded.”), I would expect R2.1 to have automatically changed the API 2.0 event pressed back to the prior name action when the project was loaded, but it didn’t and kept the name “pressed”.
The 3rd sentence is also confusing ("If there are two events with the same purpose in a project (such as Open/Opening) they will be left alone so you can review the code and remove the now-unneeded additional event. " In this case, since the old pushbutton “action” event and the newer “pressed” would seem to have the same purpose, should we expect R2.1 to have left this alone? This seems to be the case.
In other words, by my reading, sentence 2 implies that R2.1 would change the event, while sentence 3 implies that it would leave it alone.