CustomEditField

Is there any documentation for the CustomEditField by Alex Restrepo?

Only what came in the ZIP file

If you read the code in the methods, there are some comments. It might not tell you everything you need to know but at least you can work it out for yourself. I had the frustration of the blinker not showing up properly on Windows and after a while of analysing the project, I managed to change the code so the blinker worked properly.

Could you share Oliver ?

CustomEditField Download

SyntaxHighlightEditField Download

[quote=80437:@Axel Schneider]CustomEditField Download

SyntaxHighlightEditField Download[/quote]

What is the better one between the two? What differences are there?

IF you want proper text handling and input handling on OS X I’d make sure these are based on the TextInputField plugin.
That probably means a rewrite.

There are things that will never work right in Cocoa if these are
a) custom canvas subclasses
b) text field subclasses

They literally cannot work right.
Try pressing & holding the e key - you should get a little pop over to select one of many variants - it won’t happen.

This is one thing that we had to completely rewrite for the new IDE on Cocoa - the old code editor was also a custom canvas implementation and it suffered from those shortcomings.
And no you can’t implement it right with declares.

All i really want is to colour code SQL syntax and have code completion. I tried the CEF but I had 70 KB of syntax in the text box and it began to get so sluggish when you typed it was unusable.

Do you mean sharing the code to make the blinker look better?

[quote=80479:@Norman Palardy]IF you want proper text handling and input handling on OS X I’d make sure these are based on the TextInputField plugin.
That probably means a rewrite.

There are things that will never work right in Cocoa if these are
a) custom canvas subclasses
b) text field subclasses

They literally cannot work right.
Try pressing & holding the e key - you should get a little pop over to select one of many variants - it won’t happen.

This is one thing that we had to completely rewrite for the new IDE on Cocoa - the old code editor was also a custom canvas implementation and it suffered from those shortcomings.
And no you can’t implement it right with declares.[/quote]
What does it mean to not have ‘proper’ input and text handling?

The TextInputField itself isn’t that hard to get the hang of BUT things like how you do the backing buffer of text & style data would have a huge impact on overall speed

The IDE’s text editor is also based on it - you could get a feel for how it behaves by pasting in 70Kb of code into it
I just quickly tried that here with a single method that has 4300 lines (which amounts to about 170K)
Typing gets a tad slow as it tries to reindent & colorize it all on the fly

[quote=80542:@Norman Palardy]The TextInputField itself isn’t that hard to get the hang of BUT things like how you do the backing buffer of text & style data would have a huge impact on overall speed

The IDE’s text editor is also based on it - you could get a feel for how it behaves by pasting in 70Kb of code into it
I just quickly tried that here with a single method that has 4300 lines (which amounts to about 170K)
Typing gets a tad slow as it tries to reindent & colorize it all on the fly[/quote]
So is it purely a performance issue?

[quote=80542:@Norman Palardy]The TextInputField itself isn’t that hard to get the hang of BUT things like how you do the backing buffer of text & style data would have a huge impact on overall speed

The IDE’s text editor is also based on it - you could get a feel for how it behaves by pasting in 70Kb of code into it
I just quickly tried that here with a single method that has 4300 lines (which amounts to about 170K)
Typing gets a tad slow as it tries to reindent & colorize it all on the fly[/quote]
Also how do I implement a TextInputField? I have Windows btw.

Is what purely a performance issue ?

TextInputCanvas (sorry)
You get the plugin - GitHub - xojo/TextInputCanvas: TextInputCanvas is a plugin for the Xojo programming environment that allows developers to implement custom text input controls with international input support.
Add it to your Xojo install then create a control that subclasses that

On Windows it won’t change much - if anything
But on OS X you can’t do OS X style text input without it

[quote=80552:@Norman Palardy]TextInputCanvas (sorry)
You get the plugin - https://github.com/xojo/TextInputCanvas
Add it to your Xojo install then create a control that subclasses that

On Windows it won’t change much - if anything
But on OS X you can’t do OS X style text input without it[/quote]
Thanks. I presume Mac is a requirement to implement this and can only be tested on Mac?

Thanks

Oh heck no - the plugin is cross platform
But the biggest benefit is on OS X
Windows doesn’t do a lot of what OS X does for text input

How do you build the plugin? I can’t see the complied plugin to use.

In addition, it doesn’t matter on which platform the build is done, right? I can build on Mac and use on Win

Thanks

[quote=92543:@John Kouraklis]How do you build the plugin? I can’t see the complied plugin to use.

In addition, it doesn’t matter on which platform the build is done, right? I can build on Mac and use on Win

Thanks[/quote]

The plugin is already built. You will want to place it in your plugins folder inside your Xojo application folder. Xojo is the cross-platform compiler that can build Windows, Mac, and Linux applications on Windows, Mac, or Linux (any 3 can compile on all 3). You will only be able to run the compiled application on the specific platform (ie Mac on Mac, Windows on Windows, Linux on Linux.) though. If you have added the plugin to your plugin folder, and restarted Xojo, the plugin will appear in your Library of controls.

Matthew,

thanks for the reply.

if you download the files from the above link, they don’t contain any .rbx or the new format files.

Regards,

John