RTEdit for Xojo open sourced -> easily make it run on older versions

RTEdit is a really nice control but “needs” Xojo 2023 R3, so just a helping hand for those plodding along on older versions of Xojo:

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.

Shows just how pointless the renaming fiasco was.

10 Likes

P.S. Maybe someone could post this to RTEdit 2.0 is out! The most powerful rich text control for Xojo - General - Xojo Programming Forum as I can’t.

With the level of censorship there I mouton anyone here wants to run the risk of pissing them off and getting banned

What ever, this information would be nice to have for many. So it would be nice if somebody would post it. And that would bring the “we are leaving XoJo” up again. Also needed to remember them that their system is dead until the end.

Well, I wouldn’t expect my last sentence to be posted, but the actual info shouldn’t be controversial.

Use it however you want guys (i wrote the control out of despair with xojo)

Re did the whole thing in react over a day or two and i feel liberated !

Would be nice to see updates to the control maintained on github though for version control , since there are no proper rich text controls for xojo out there and the control became “wildly” popular within the tiny community of xojo (which i think will die within 3 years)

3 Likes

But it changes nothing: you left Xojo and you got: it is a bad idea developing on Xojo. What ever: I hope the control stays well for the Xojo users.

I have one html editor control that I use internally… will certainly publish it open source sooner or later…

1 Like