[Gambas-user] How does gb.highlight affect older projects with editor

Bruce Steers bsteers4 at gmail.com
Tue Nov 21 13:57:47 CET 2023


you can no longer use gb.eval.highlight with TextEditor as Texteditor now
uses gb.highlight and it conflicts with gb.eval.highlight.

.I have a number of programs using textedidor and have not had much
problem. just a little tweak here and there.

Mostly i have found the following...

gb.highlight is "mostly" compatible compatible with gb.eval.highlight code.

The TextEditor.Styles property has gone but you can either change it to
TexEditor.Theme or use a hidden method TexEditor1/_GetStyles()

A project using text editor will not function until you remove
gb.eval.highlight component due to TextHighlighter.CanRewrite property
changing from static.
You have to load the project and remove gb.eval.highlight manually as
TextEditor "Requires" gb.highlight so it adds it automatically causing a
conflict.

For the most part there is not much of a change but bare in mind i have not
used gb.eval.highlight component much myself i have just used texteditor
that uses it and the change inside there is barely noticable.

On the plus side now many custom highlight files can be created and loaded
from file by your programs :)


BruceS


On Tue, 21 Nov 2023 at 10:57, Rolf-Werner Eilert <rwe-sse at osnanet.de> wrote:

> The new gb.highlight surely reads like a nifty peace of software, it
> remembers me of the Python Lexer which is controlled via a css file.
>
> But what about my older software projects which still use the
> gb.eval.highlight component? There are a few where I use the editor to
> enable the user to edit my own config or macro files with their own
> highlighting. And in these projects, the editor appears at different
> places/dialogs with different highlightings for different kinds of files.
>
> Will I have to rewrite them? Or will you leave the gb.eval.highlight
> component in the list? Or will there be a compatibility level for the
> editor?
>
> I remember that some time ago there has been a change to this
> highlighting thing. It was said, you have to recode everything, but it
> turned out relatively easy as I merely had to change some keywords. The
> rest of it had remained the same. Here the effort will be much greater I
> guess.
>
> Regards
> Rolf
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231121/dcca0d3a/attachment.htm>


More information about the User mailing list