-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Not per se an issue, just a helping hand for those plodding along on older versions:
You need just 3 simple global extension methods to make it run on older Xojo versions
For each new version of Xojo I have a Backwards Compatibility Module, eg IntroducedIn2022R1, IntroducedIn2022R2, IntroducedIn2022R3, etc.
Each module contains extension methods for the "newly introduced" methods (which often are just renamed old methods).
With these Compatibility modules the newer code runs just fine without changes on older versions that do not have these methods..
Should go without sayingl that you do not need Compatibility modules that are older than the version you use - eg if you have Xojo 2022 R2 then you don’t need the modules for 2022 R2 or older.
Module IntroducedIn2022R1:
Public Sub CellBoldAt(extends lb as DesktopListBox, row as integer, col as Integer, Assigns b as Boolean)
lb.CellBold(row, col) = b
End Sub
Module IntroducedIn2022R2:
Public Function Contains(extends s as String, searchString as String) As Boolean
Return s.InStr(searchString) > 0
End Function
Module IntroducedIn2023R3:
Public Function SelectedRowText(extends pop As DesktopPopupMenu) As String
return pop.SelectedRowValue
End Function
Now RTFedit runs perfectly fine in Xojo 2021 R3.1 (and possibly earlier versions) too.