After some wrangling with InitScintilla(), I found that it does not permit changing of standard Scintilla lexers. I do not know if this is a bug, or the version is merely limited. Using InitScintillaStaticFull(), the feature started working. I also had success with OpenLibrary:
OpenLibrary(#PB_Any, "SciLexer.dll")
Unfortunately, I cannot use InitScintillaStaticFull() since it is not "sustainable". (i.e. part of the compiler, or open source.)
I would like to request a full version of Scintilla (with and without the lexers), with Native PB commands, statically linked for all OS's.
BTW, I am currently using Win7, 32-bit, in case it is a bug.
Thank you!
Scintilla, static, and with full features
Re: Scintilla, static, and with full features
This is the code that demonstrates that it is either a bug or a missing feature:
Code: Select all
If OpenWindow(0, 0, 0, 320, 90, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If InitScintilla() ; change to InitScintillaStaticFull() and it works.
ScintillaGadget(0, 10, 10, 300, 70, #Null)
Debug ScintillaSendMessage(0, #SCI_GETLEXER)
ScintillaSendMessage(0, #SCI_SETLEXER, #SCLEX_CPP, 0)
Debug ScintillaSendMessage(0, #SCI_GETLEXER)
; Output set to red color
ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
; Set the initial text to the ScintillaGadget
ScintillaSendMessage(0, #SCI_SETTEXT, 0, @"This is a simple ScintillaGadget with text...")
; Adding a second line of text with linebreak before
Text$ = Chr(10) + "Second line"
ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), @Text$)
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Re: Scintilla, static, and with full features
ähem
is InitScintillaStaticFull() from gnozals userlib ?
is InitScintillaStaticFull() from gnozals userlib ?
Re: Scintilla, static, and with full features
Yes, exactly. And that is why I am requesting it from PB; so it can be a native part of PB.Bisonte wrote:ähem
is InitScintillaStaticFull() from gnozals userlib ?
I cannot use gnozals libs, because they are not properly sustainable. They are not open source, they are not on all platforms, and they are not as "reliable" as PB from a longevity standpoint. For me to use a library, it must meet that criteria.
It is out of no disrespect to gnozal, but if he gets hit by a bus, or catches the C flu, then the lib gets frozen in time, with no more bugfixes, no more updates, etc.
I stated this all in my original post, so I guess I do not understand what your "ahem" was about. I merely used his library to demonstrate how the lexers are lacking in PB's library. As it is, I have to use a DLL within Windows, and when I begin porting the project to Linux and Mac, it seems safe to presume the missing features will still be missing.
Re: Scintilla, static, and with full features
just use InitScintilla("SciLexer.dll")
Re: Scintilla, static, and with full features
Sure, for windows. But not Mac or Linux...xorc1zt wrote:just use InitScintilla("SciLexer.dll")
Re: Scintilla, static, and with full features
the static lib from linux should full featured, with lexers!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: Scintilla, static, and with full features
Plus that userlib is not 64bit so it's no good for modern OSes
I give a +1 to this request.
