Re: Cannot load a lexer

Roger Tunnicliffe <[email protected]> Fri, 12 Dec 2025 19:05:55 -0800 (PST)
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
------=_Part_64642_2132595990.1765595155543
Content-Type: multipart/alternative; 
	boundary="----=_Part_64643_361107993.1765595155543"

------=_Part_64643_361107993.1765595155543
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable


Roger Tunnicliffe
8:
Thx for the reply Neil.

Correcting SCI_SETILEXER did not provide any Highlighting in Scintilla at=
=20
all.

I have been struggling with this for days and days and the snippet I posted=
=20
was just a cut down of all those efforts.
The doco page for Lexilla suggest that the posted code is all I need but I=
=20
keep reading that I have to provide keywords as well.
I have tried that but still get no highlighting. In fact there probably=20
isn't anything I haven't tried (except the right thing I suppose)

As an aside, I have spent days with all those dumb$#@ AI's who can only=20
explain why their idiotic code does not even compile (Mostly they tell you=
=20
that you are frustrated and that they lied)
God knows why there's been a trillion dollars spent on these things.

All that aside I wonder if you or anyone else here could guide me thru this=
=20
as I  just don't believe it should be that hard.

edit:-=20
Dim pLexer As Any Ptr =3D CreateLexer("freebasic")
CONST SCI_SETILEXER As UInteger =3D 4033
VAR result =3D scintilla_send_message(sci, SCI_SETILEXER, 0, pLexer)
Dim tmp As string
scintilla_send_message(sci, SCI_GETLEXERLANGUAGE, 0, strptr(tmp))

SCI_GETLEXERLANGUAGE returns nothing

Thanking you in advance
Roger

On Friday, December 12, 2025 at 3:29:24=E2=80=AFPM UTC+11 Neil wrote:

> Roger Tunnicliffe:
>
> > The following code returns pLexer but SETILEXER always returns a 0.
>
> SCI_SETILEXER does not return anything. There aren't even any checks
> on that call, Scintilla just stores the value given.
>
> https://scintilla.org/ScintillaDoc.html#SCI_SETILEXER
>
> > Dim pLexer As Any Ptr =3D CreateLexer("freebasic")
>
> Good. Check for NULL.
>
> > Dim result As ULong =3D scintilla_send_message(sci, SCI_GETLEXER, 0,=20
> pLexer)
>
> SCI_GETLEXER doesn't take any arguments. At this point it will likely
> return something boring like 0.
>
> > CONST SCI_SETILEXER As UInteger =3D 2187
>
> From Scintilla.h:
> #define SCI_SETILEXER 4033
>
> 2187 is not associated with lexing:
> #define SCI_GETOVERTYPE 2187
>
> Neil
>

--=20
You received this message because you are subscribed to the Google Groups "=
scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-i=
nterest/2d5c10af-773e-4dff-a570-a4f7ce7de378n%40googlegroups.com.

------=_Part_64643_361107993.1765595155543
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div><div style=3D"align-items: center; color: rgb(95, 99, 104); display: f=
lex; height: 48px; justify-content: space-between;"><div style=3D"overflow:=
 hidden; text-overflow: ellipsis; text-wrap-mode: nowrap;"><span style=3D"f=
ont-family: Roboto, Arial, sans-serif; letter-spacing: 0.25px; line-height:=
 20px; color: rgb(32, 33, 36); margin-top: 0px; margin-bottom: 0px; margin-=
right: 16px;"><br />Roger Tunnicliffe</span></div><span style=3D"clip: rect=
(1px, 1px, 1px, 1px); height: 1px; margin: 0px; overflow: hidden; padding: =
0px; position: absolute; text-wrap-mode: nowrap; width: 1px; z-index: -1000=
;"></span><div style=3D"font-family: Roboto, Arial, sans-serif; font-size: =
12px; letter-spacing: 0.3px; line-height: 16px; align-items: center; displa=
y: flex;">8:<div role=3D"presentation" style=3D"display: flex;"></div></div=
></div></div><div aria-labelledby=3D"c3" role=3D"region" style=3D"margin: 1=
2px 0px; overflow: auto; padding-right: 20px;">Thx for the reply Neil.<div>=
<br /></div><div>Correcting SCI_SETILEXER did not provide any Highlighting =
in Scintilla at all.</div><div><br /></div><div>I have been struggling with=
 this for days and days and the snippet I posted was just a cut down of all=
 those efforts.</div><div>The doco page for Lexilla suggest that the posted=
 code is all I need but I keep reading that I have to provide keywords as w=
ell.</div><div>I have tried that but still get no highlighting. In fact the=
re probably isn't anything I haven't tried (except the right thing I suppos=
e)</div><div><br /></div><div>As an aside, I have spent days with all those=
 dumb$#@ AI's who can only explain why their idiotic code does not even com=
pile (Mostly they tell you that you are frustrated and that they lied)</div=
><div>God knows why there's been a trillion dollars spent on these things.<=
/div><div><br /></div><div>All that aside I wonder if you or anyone else he=
re could guide me thru this as I=C2=A0 just don't believe it should be that=
 hard.</div><div><br /></div><div>edit:-=C2=A0</div><div><div style=3D"colo=
r: rgb(204, 204, 204); background-color: rgb(31, 31, 31); font-family: &quo=
t;Droid Sans Mono&quot;, &quot;monospace&quot;, monospace; font-size: 13px;=
 line-height: 18px; white-space: pre;"><div>        <span style=3D"color: r=
gb(86, 156, 214);">Dim</span><span style=3D"color: rgb(156, 220, 254);"> pL=
exer </span><span style=3D"color: rgb(212, 212, 212);">As</span> <span styl=
e=3D"color: rgb(78, 201, 176);">Any</span> <span style=3D"color: rgb(156, 2=
20, 254);">Ptr</span> <span style=3D"color: rgb(212, 212, 212);">=3D</span>=
 <span style=3D"color: rgb(220, 220, 170);">CreateLexer</span>(<span style=
=3D"color: rgb(206, 145, 120);">"freebasic"</span>)</div><div>        <span=
 style=3D"color: rgb(86, 156, 214);">CONST </span>SCI_SETILEXER <span style=
=3D"color: rgb(212, 212, 212);">As</span> <span style=3D"color: rgb(78, 201=
, 176);">UInteger</span> <span style=3D"color: rgb(212, 212, 212);">=3D</sp=
an> <span style=3D"color: rgb(181, 206, 168);">4033</span></div><div>      =
  VAR <span style=3D"color: rgb(156, 220, 254);">result</span> <span style=
=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color: rgb(220, 2=
20, 170);">scintilla_send_message</span>(<span style=3D"color: rgb(156, 220=
, 254);">sci</span>,<span style=3D"color: rgb(156, 220, 254);"> SCI_SETILEX=
ER</span>, <span style=3D"color: rgb(181, 206, 168);">0</span>,<span style=
=3D"color: rgb(156, 220, 254);"> pLexer</span>)</div><div>    <span style=
=3D"color: rgb(86, 156, 214);">    Dim </span>tmp <span style=3D"color: rgb=
(212, 212, 212);">As</span> <span style=3D"color: rgb(78, 201, 176);">strin=
g</span></div><div>        <span style=3D"color: rgb(220, 220, 170);">scint=
illa_send_message</span>(<span style=3D"color: rgb(156, 220, 254);">sci</sp=
an>,<span style=3D"color: rgb(156, 220, 254);"> SCI_GETLEXERLANGUAGE</span>=
, <span style=3D"color: rgb(181, 206, 168);">0</span>, <span style=3D"color=
: rgb(220, 220, 170);">strptr</span>(<span style=3D"color: rgb(156, 220, 25=
4);">tmp</span>))</div><div><br /></div><div>SCI_GETLEXERLANGUAGE returns n=
othing</div></div></div><div><br /></div><div>Thanking you in advance</div>=
<div>Roger</div></div><br /><div class=3D"gmail_quote"><div dir=3D"auto" cl=
ass=3D"gmail_attr">On Friday, December 12, 2025 at 3:29:24=E2=80=AFPM UTC+1=
1 Neil wrote:<br/></div><blockquote class=3D"gmail_quote" style=3D"margin: =
0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"=
>Roger Tunnicliffe:
<br>
<br>&gt; The following code returns pLexer but SETILEXER always returns a 0=
.
<br>
<br>SCI_SETILEXER does not return anything. There aren&#39;t even any check=
s
<br>on that call, Scintilla just stores the value given.
<br>
<br><a href=3D"https://scintilla.org/ScintillaDoc.html#SCI_SETILEXER" targe=
t=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https://www.google.co=
m/url?hl=3Den&amp;q=3Dhttps://scintilla.org/ScintillaDoc.html%23SCI_SETILEX=
ER&amp;source=3Dgmail&amp;ust=3D1765681466847000&amp;usg=3DAOvVaw3o8586rU2g=
x_TFCAHU7mYg">https://scintilla.org/ScintillaDoc.html#SCI_SETILEXER</a>
<br>
<br>&gt; Dim pLexer As Any Ptr =3D CreateLexer(&quot;freebasic&quot;)
<br>
<br>Good. Check for NULL.
<br>
<br>&gt; Dim result As ULong =3D scintilla_send_message(sci, SCI_GETLEXER, =
0, pLexer)
<br>
<br>SCI_GETLEXER doesn&#39;t take any arguments. At this point it will like=
ly
<br>return something boring like 0.
<br>
<br>&gt; CONST SCI_SETILEXER As UInteger =3D 2187
<br>
<br>From Scintilla.h:
<br>#define SCI_SETILEXER 4033
<br>
<br>2187 is not associated with lexing:
<br>#define SCI_GETOVERTYPE 2187
<br>
<br>Neil
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;scintilla-interest&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
scintilla-interest/2d5c10af-773e-4dff-a570-a4f7ce7de378n%40googlegroups.com=
?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/=
scintilla-interest/2d5c10af-773e-4dff-a570-a4f7ce7de378n%40googlegroups.com=
</a>.<br />

------=_Part_64643_361107993.1765595155543--

------=_Part_64642_2132595990.1765595155543--