Page 1 of 1

Scintilla, static, and with full features

Posted: Wed Jun 13, 2012 8:52 pm
by Tenaja
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!

Re: Scintilla, static, and with full features

Posted: Wed Jun 13, 2012 8:54 pm
by Tenaja
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

Posted: Fri Jun 15, 2012 10:31 am
by Bisonte
ähem

is InitScintillaStaticFull() from gnozals userlib ?

Re: Scintilla, static, and with full features

Posted: Fri Jun 15, 2012 3:51 pm
by Tenaja
Bisonte wrote:ähem
is InitScintillaStaticFull() from gnozals userlib ?
Yes, exactly. And that is why I am requesting it from PB; so it can be a native part of PB.

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

Posted: Fri Jun 15, 2012 9:40 pm
by xorc1zt
just use InitScintilla("SciLexer.dll")

Re: Scintilla, static, and with full features

Posted: Fri Jun 15, 2012 10:11 pm
by Tenaja
xorc1zt wrote:just use InitScintilla("SciLexer.dll")
Sure, for windows. But not Mac or Linux...

Re: Scintilla, static, and with full features

Posted: Fri Jun 15, 2012 10:26 pm
by ts-soft
the static lib from linux should full featured, with lexers!

Re: Scintilla, static, and with full features

Posted: Mon Jun 25, 2012 9:02 pm
by X
Plus that userlib is not 64bit so it's no good for modern OSes :( I give a +1 to this request.