Re: Cannot load a lexer
Roger Tunnicliffe <[email protected]> Fri, 12 Dec 2025 20:33:29 -0800 (PST)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_134082_1870067189.1765600409225
Content-Type: multipart/alternative;
boundary="----=_Part_134083_1100703155.1765600409225"
------=_Part_134083_1100703155.1765600409225
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Sorry but I cant see how to edit a post.
The following though
dim R as integer =3D scintilla_send_message(sci, SCI_GETLEXER, NULL, pLexer=
)
returns a value of 75
On Saturday, December 13, 2025 at 2:05:55=E2=80=AFPM UTC+11 Roger Tunniclif=
fe wrote:
>
> 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=20
> posted 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 yo=
u=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=20
> this 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:=20
>>
>> > The following code returns pLexer but SETILEXER always returns a 0.=20
>>
>> SCI_SETILEXER does not return anything. There aren't even any checks=20
>> on that call, Scintilla just stores the value given.=20
>>
>> https://scintilla.org/ScintillaDoc.html#SCI_SETILEXER=20
>>
>> > Dim pLexer As Any Ptr =3D CreateLexer("freebasic")=20
>>
>> Good. Check for NULL.=20
>>
>> > Dim result As ULong =3D scintilla_send_message(sci, SCI_GETLEXER, 0,=
=20
>> pLexer)=20
>>
>> SCI_GETLEXER doesn't take any arguments. At this point it will likely=20
>> return something boring like 0.=20
>>
>> > CONST SCI_SETILEXER As UInteger =3D 2187=20
>>
>> From Scintilla.h:=20
>> #define SCI_SETILEXER 4033=20
>>
>> 2187 is not associated with lexing:=20
>> #define SCI_GETOVERTYPE 2187=20
>>
>> Neil=20
>>
>
--=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/eb583130-723b-4a8c-9fab-756962e81108n%40googlegroups.com.
------=_Part_134083_1100703155.1765600409225
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Sorry but I cant see how to edit a post.<div><br /></div><div>The following=
though</div><div><br /></div><div><div style=3D"color: rgb(204, 204, 204);=
background-color: rgb(31, 31, 31); font-family: "Droid Sans Mono"=
;, "monospace", monospace; font-size: 13px; line-height: 18px; wh=
ite-space: pre;"><div><span style=3D"color: rgb(86, 156, 214);">dim</span><=
span style=3D"color: rgb(156, 220, 254);"> R </span><span style=3D"color: r=
gb(212, 212, 212);">as</span> <span style=3D"color: rgb(78, 201, 176);">int=
eger</span> <span style=3D"color: rgb(212, 212, 212);">=3D</span> <span sty=
le=3D"color: rgb(220, 220, 170);">scintilla_send_message</span>(<span style=
=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"color: rgb(156, 2=
20, 254);"> SCI_GETLEXER</span>,<span style=3D"color: rgb(86, 156, 214);"> =
NULL</span>,<span style=3D"color: rgb(156, 220, 254);"> pLexer</span>)</div=
><div><br /></div><div>returns a value of 75</div></div><br /></div><div cl=
ass=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Saturday, Dec=
ember 13, 2025 at 2:05:55=E2=80=AFPM UTC+11 Roger Tunnicliffe 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;"><div><div style=3D"=
color:rgb(95,99,104);display:flex;min-height:48px"><div style=3D"overflow:h=
idden;text-overflow:ellipsis"><span style=3D"font-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"min-height:1px;margin:0px;overflow:hidden;padding:0px;width=
:1px"></span><div style=3D"font-family:Roboto,Arial,sans-serif;font-size:12=
px;letter-spacing:0.3px;line-height:16px;display:flex">8:<div role=3D"prese=
ntation" style=3D"display:flex"></div></div></div></div><div aria-labelledb=
y=3D"c3" role=3D"region" style=3D"margin:12px 0px;overflow:auto;padding-rig=
ht:20px">Thx for the reply Neil.<div><br></div><div>Correcting SCI_SETILEXE=
R 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 fo=
r Lexilla suggest that the posted code is all I need but I keep reading tha=
t I have to provide keywords as well.</div><div>I have tried that but still=
get no highlighting. In fact there probably isn't anything I haven'=
;t tried (except the right thing I suppose)</div><div><br></div><div>As an =
aside, I have spent days with all those dumb$#@ AI's who can only expla=
in why their idiotic code does not even compile (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 here 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"color:rgb(204,204,204);backgroun=
d-color:rgb(31,31,31);font-family:"Droid Sans Mono","monospa=
ce",monospace;font-size:13px;line-height:18px;white-space:pre"></div><=
/div></div><div aria-labelledby=3D"c3" role=3D"region" style=3D"margin:12px=
0px;overflow:auto;padding-right:20px"><div><div style=3D"color:rgb(204,204=
,204);background-color:rgb(31,31,31);font-family:"Droid Sans Mono"=
;,"monospace",monospace;font-size:13px;line-height:18px;white-spa=
ce:pre"><div> <span style=3D"color:rgb(86,156,214)">Dim</span><span =
style=3D"color:rgb(156,220,254)"> pLexer </span><span style=3D"color:rgb(21=
2,212,212)">As</span> <span style=3D"color:rgb(78,201,176)">Any</span> <spa=
n style=3D"color:rgb(156,220,254)">Ptr</span> <span style=3D"color:rgb(212,=
212,212)">=3D</span> <span style=3D"color:rgb(220,220,170)">CreateLexer</sp=
an>(<span style=3D"color:rgb(206,145,120)">"freebasic"</span>)</d=
iv></div></div></div><div aria-labelledby=3D"c3" role=3D"region" style=3D"m=
argin:12px 0px;overflow:auto;padding-right:20px"><div><div style=3D"color:r=
gb(204,204,204);background-color:rgb(31,31,31);font-family:"Droid Sans=
Mono","monospace",monospace;font-size:13px;line-height:18px=
;white-space:pre"><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(2=
12,212,212)">=3D</span> <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,220,170)">scintilla_send_message</span>(<span style=3D"color:rgb(156,22=
0,254)">sci</span>,<span style=3D"color:rgb(156,220,254)"> SCI_SETILEXER</s=
pan>, <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</sp=
an> <span style=3D"color:rgb(78,201,176)">string</span></div><div> <=
span style=3D"color:rgb(220,220,170)">scintilla_send_message</span>(<span s=
tyle=3D"color:rgb(156,220,254)">sci</span>,<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,254)">tmp</span>))</div><div><br></div><div>SCI_GETLE=
XERLANGUAGE returns nothing</div></div></div><div><br></div><div>Thanking y=
ou in advance</div><div>Roger</div></div><br><div class=3D"gmail_quote"><di=
v dir=3D"auto" class=3D"gmail_attr">On Friday, December 12, 2025 at 3:29:24=
=E2=80=AFPM UTC+11 Neil wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-l=
eft:1ex">Roger Tunnicliffe:
<br>
<br>> The following code returns pLexer but SETILEXER always returns a 0=
.
<br>
<br>SCI_SETILEXER does not return anything. There aren'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" rel=
=3D"nofollow" target=3D"_blank" data-saferedirecturl=3D"https://www.google.=
com/url?hl=3Den&q=3Dhttps://scintilla.org/ScintillaDoc.html%23SCI_SETIL=
EXER&source=3Dgmail&ust=3D1765686749546000&usg=3DAOvVaw0n2g9uLY=
PBKwC4yWERdorS">https://scintilla.org/ScintillaDoc.html#SCI_SETILEXER</a>
<br>
<br>> Dim pLexer As Any Ptr =3D CreateLexer("freebasic")
<br>
<br>Good. Check for NULL.
<br>
<br>> Dim result As ULong =3D scintilla_send_message(sci, SCI_GETLEXER, =
0, pLexer)
<br>
<br>SCI_GETLEXER doesn't take any arguments. At this point it will like=
ly
<br>return something boring like 0.
<br>
<br>> 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></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;scintilla-interest" 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/eb583130-723b-4a8c-9fab-756962e81108n%40googlegroups.com=
?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/=
scintilla-interest/eb583130-723b-4a8c-9fab-756962e81108n%40googlegroups.com=
</a>.<br />
------=_Part_134083_1100703155.1765600409225--
------=_Part_134082_1870067189.1765600409225--