Page 10 of 20

Re: GoScintilla - 2.0 (beta 4)

Posted: Tue May 18, 2010 9:14 pm
by LCD
Big thanks!!!

Re: GoScintilla - 2.0 (beta 4)

Posted: Sun May 23, 2010 4:39 pm
by ts-soft
New wish :wink:

Can you add some scintilla searchfunction to easy searching/replacing with selecting?
(Supporting RegEx?)

greetings
Thomas

Re: GoScintilla - 2.0 (beta 4)

Posted: Mon May 24, 2010 1:00 am
by ts-soft
Problem with PB 4.50 RC 1 = IMA

GoScintilla.pbi line 187: "*this\keywordPtr() = *ptrKeyword"

greetings
Thomas

Re: GoScintilla - 2.0 (beta 4)

Posted: Mon May 24, 2010 11:16 am
by srod
ts-soft wrote:Problem with PB 4.50 RC 1 = IMA

GoScintilla.pbi line 187: "*this\keywordPtr() = *ptrKeyword"

greetings
Thomas
A bug with PB by the look of it.

http://www.purebasic.fr/english/viewtop ... 77#p324777

Re: GoScintilla - 2.0 (beta 4)

Posted: Mon May 24, 2010 3:57 pm
by Trond
There is a problem with backspace and code completion (the popup window opens and closes for every other backspace).

And the right-click menu isn't positioned 100% at the pointer.

Just testing it a bit, looks nice.

Re: GoScintilla - 2.0 (beta 4)

Posted: Mon May 24, 2010 5:45 pm
by srod
Trond wrote:There is a problem with backspace and code completion (the popup window opens and closes for every other backspace).

And the right-click menu isn't positioned 100% at the pointer.

Just testing it a bit, looks nice.
The context menu belongs to Scintilla and is nothing to do with me. :)

Scintilla's code-completion lists and call-tips do have some 'quirks' which I have mentioned previously somewhere in this thread. The backspace issue is one of them. I did investigate this one quite a bit and there is no good reason that I can see why the list does not appear on every other backspace etc. Certainly, GoScintilla 2 sends the relevant messages at the correct time (have just checked once more). It is a mystery and something, I think, we are going to have to live with. The PB IDE of course does not use Scintilla's code-completion lists.

**EDIT : if Scintilla's code-completion lists do prove un-satisfactory for many then I shall consider following Freak's lead and roll my own implementation. Personally, I can live with the various quirks though.

Re: GoScintilla - 2.0 (beta 4)

Posted: Fri May 28, 2010 1:13 am
by LCD
One wish: I try to use a marker (Arrows) to show the line where error occurs, so I defined the marker and wanted to display it, but it is not displayed (I use the code from a version before I started to use GoScintilla, which was working previously). I think, folding markers overwrite my error marker, but the same problem exists outside of folds. Can you add a way to display the markers?

Re: GoScintilla - 2.0 (beta 4)

Posted: Fri May 28, 2010 9:32 am
by srod
LCD wrote:One wish: I try to use a marker (Arrows) to show the line where error occurs, so I defined the marker and wanted to display it, but it is not displayed (I use the code from a version before I started to use GoScintilla, which was working previously). I think, folding markers overwrite my error marker, but the same problem exists outside of folds. Can you add a way to display the markers?
Please read the manual (GoScintilla 2) - Additional section --> Bookmarks.

There are two margins which GoScintilla 2 does not make use of : #GOSCI_MARGINUSER1 and #GOSCI_MARGINUSER2. Use either of these for your own markers.

In addition, GoScintilla 2 uses marker index 0 for bookmarks and so you should steer away from this index. Use any index from 1 to 31.

And that is all you need to know. Apart from this, just use markers as you would with any Scintilla control.

For example, the following little snippet shows how you might use margin #GOSCI_MARGINUSER1 for a marker (index 1). I color the marker symbol red :

Code: Select all

GOSCI_SetMarginWidth(id, #GOSCI_MARGINUSER1, 20)
ScintillaSendMessage(id, #SCI_SETMARGINMASKN, #GOSCI_MARGINUSER1, 1<<1)  ;Only marker number 1 to be allowed.
ScintillaSendMessage(id, #SCI_MARKERDEFINE, 1, #SC_MARK_SHORTARROW)
ScintillaSendMessage(id, #SCI_MARKERSETBACK, 1, #Red)
Note that the default width of the #GOSCI_MARGINUSER1 margin is zero. If you keep it at zero then adding a marker to this margin has the effect of coloring the entire line etc. which can be quite useful.

Add the marker to line 0 with the following :

Code: Select all

ScintillaSendMessage(id, #SCI_MARKERADD, 0, 1)
I have tested and it works fine.

Re: GoScintilla - 2.0 (beta 4)

Posted: Fri May 28, 2010 11:44 pm
by LCD
Yes, it works... A case of RTFM... :D

Re: GoScintilla - 2.0 (beta 4)

Posted: Thu Jun 10, 2010 12:10 am
by LCD
Is it possible to create two independent lexers for the same source code? I want to make ASM / END ASM Block with a completly different lexers. My problem is: SUB / END SUB is defined as SUBroutine and create folding points, but there is also SUB in Assembly language, but it must not create folding points. Also I tried to mix multiwords with multiline comments, but it did not work. I understand some of the GoScintilla Code, but MyLexer is black magic yet.

Re: GoScintilla - 2.0 (beta 4)

Posted: Fri Jun 11, 2010 11:43 pm
by ts-soft
Adding a Keyword for folding on the fly is no problem, but remove a keyword only from folding?

greetings
Thomas

Re: GoScintilla - 2.0 (beta 4)

Posted: Sat Jun 12, 2010 4:33 pm
by srod
ts-soft wrote:Adding a Keyword for folding on the fly is no problem, but remove a keyword only from folding?

greetings
Thomas
At the moment, the only way of accomplishing that is to use GOSCI_RemoveKeywords() to completely remove the appropriate keywords and then to add them again using GOSCI_AddKeywords() or GOSCI_AddKeywordsEx(), but omitting the #GOSCI_OPENFOLDKEYWORD flag etc. Make sure that you also remove the corresponding close fold keywords etc.

Re: GoScintilla - 2.0 (beta 4)

Posted: Sat Jun 12, 2010 4:39 pm
by ts-soft
thx for your answer, but i think i can't go this way, but i will a bit more testing :wink:

Re: GoScintilla - 2.0 (beta 4)

Posted: Sat Jun 12, 2010 5:01 pm
by srod
Off hand I cannot think of any reason why this should not work in any circumstance.

The thing about AddKeywords() is that the keywordFlags parameter is OR'd with any existing value for that keyword and so there is no way, at present, to remove individual bit values (such as #GOSCI_OPENFOLDKEYWORD). I did this for reason linked to global call-tip separators.

Well, there is one way to alter the keywordFlags values at the individual bit level...

... use the GOSCI_GetKeywordInfo() function to retrieve a pointer to the keyword's GoScintillaKeyword structure. One of these fields (flags) is what you are after. Alter this value as you see fit, e.g. remove the #GOSCI_OPENFOLDKEYWORD.

The problem now is that you need to force Scintilla to then restyle the document. The are various ways of bullying GoScintilla into forcing a complete restyle. The best way is to use GOSCI_RemoveKeywords() and remove a non-existant keyword; e.g.

Code: Select all

GOSCI_RemoveKeywords(#myID , "XXX")
I have tested and this all works fine.

Re: GoScintilla - 2.0 (beta 4)

Posted: Sat Jun 12, 2010 5:19 pm
by ts-soft
thx, all works fine :D