[Gambas-user] how long till gb.highlight hits stable?
Bruce Steers
bsteers4 at gmail.com
Mon Nov 13 20:40:12 CET 2023
On Sun, 12 Nov 2023 at 22:18, Benoît Minisini <
benoit.minisini at gambas-basic.org> wrote:
> Le 12/11/2023 à 22:04, Bruce Steers a écrit :
> >
> > Cheers Ben.
> > Errors are things like ....
> > TextHighlighter.CanRewrite not static.
>
> It was a design error.
>
> > TextEditor.Styles not available.
>
> I can put the property back. It's actually a property that was in the
> TextHighlighterTheme class.
>
Yes, it's now a hidden method TextEditor.Theme_GetStyles()
> > Plus others I mentioned in previous post.
>
> Please elaborate, I'm not sure to understand it.
>
> But if you were using a non-public API, you are doomed.
>
To explain...
The TextEditor control in my program has the KeyStroke recorder i mentioned
a while ago.
Plus it has a TextEditor.Settings property
adding Settings was easy and can be simply done with an auto-inherited
TextEditor.class file that uses Me. to get it's properties
The KeyStroke recorder was different though and involved a complete copy of
the View_KeyPress() method that uses MKey.class not Key.class
adding the Macro_KeyPress() event was not really possible in an
auto-inherited class as View_KeyPress() has many pointers to internal
private symbols/methods.
So my only option was to remove gb.form.editor from my components and
import it into the source so i can add the modifications.
That wasn't too difficult.
There's a more complicated problem now though trying to import gb.highlight
into the source, it does not like being imported :(
seems the biggest issue is i cannot just use code (without a loaded
gb.highlight component) because of the way things like CCCommandMatch, etc
are loaded in CState.class as Objects.
if not an actual component i can't get CState.class to add the various
CCommandType classes.
Try hCommand = Object.New("CCommand" & UCase(Left(sCommand)) &
Mid$(sCommand, 2))
If Error Then Error.Raise("Unknown command: " & sCommand)
Error: Unknown command: match
I've been trying various ways (for a couple of days) but cannot get them to
load as objects :(
I'm now giving up and just not using gb.highlight in my program till it is
in stable as it really does not seem portable into source from component.
Cest la vie :)
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231113/b2dca858/attachment.htm>
More information about the User
mailing list