Update TextInputCanvas on Github

I am opening this thread to convince Xojo to please, please, provide us users with an updated version of the TextInputCanvas on Github. Unfortunately, you don’t see any need to include the control by default in Xojo, which would be a real help. There are some developers whose controls are based on the TextInputCanvas.

The problem is that the control has some bugs in the repository on Github:

  • TextInputCanvas.Invalidate(X As Integer, Y As Integer, Width As Integer, Height As Integer [,EraseBackground As Boolean]) is not passed to the TextInputCanvas.Paint-Event because the parameter areas() As Object is defined, unlike the Canvas.Paint-Event (areas() As REALbasic.Rect)
    feedback://showreport?report_id=62351
  • TextInputCanvas.Paint always fires twice at program start, just like the canvas. feedback://showreport?report_id=62128

These are the two most serious bugs I think. Geoff said in Feedback Case feedback://showreport?report_id=58957:

Given that TextInputCanvas is open source, anyone in the community can update it to API 2.0, there’s no need to wait for us to do it.
But these are things that can only be fixed by Xojo.

So, please dear Xojo team, take a moment to update the control for the users. I assume that Xojo internally uses a “newer” version of the control anyway.

@Geoff_Perlman, @William_Yu, @Paul_Lefebvre

1 Like

I was told yesterday that this is the case.

We open-sourced this plugin specifically because we did not wish to support it any longer. The version we use is not abstracted from our internal code base so it would be time-consuming for us to update it.

I suggest you talk to @Christian_Schmitz about updating it if you have feature requests as I believe he has a version of it he updates. Alternatively, you could make feature requests for Xojo of the things that TextInputCanvas does that you need.

What are you using it for exactly? What does it do that one of the built-in classes does not?

@Geoff_Perlman, my request, this thread here is primarily about fixing these two bugs.

At the moment we are forced to always update the full TextInputCanvas, because TextInputCanvas.Invalidate with parameters as described above and in the feedback case about it don’t work. This is clearly a bug. Just like the fact that the control, and by the way the Xojo Canvas Control, always fires twice during initialization. This bug has also been reported and reproduced by Robin.

Remember, Bob Keeney put a lot of energy into adapting his Formatted Text control to the TextInputCanvas when you introduced it through the new IDE, 2014, because TextInputCanvas is the only way for us to program modern input fields that react to Cocoa events.

But now you write that you are no longer interested in updating, which surprises me (I hope I didn’t misunderstand you). A dilemma! Why? Because the Canvas Control simply doesn’t give us the necessary, extended possibilities to react to input, as they are available in the TextInputCanvas.

Please have a look at the two feedback cases from above.

Did you understand my request? Thank you.


Add: I already had contact with Christian and he also validated that these things can only be fixed by Xojo.

1 Like

Geoff.

To build any kind of text editor for macOS you have no choice but to use the Text Input Canvas. The standard Canvas control does not support features such as long key presses, input method entry or the Emoji / Symbols palette.

Wouldn’t it make sense to bring the Text Input Canvas up to date and switch the IDE over to that?

2 Likes

Thanks @keving that’s exactly what we need.