GoScintilla - 2.7 (Purebasic 4.5 onwards)
Re: GoScintilla - 2.1 (Purebasic 4.5 only)
I am sorry, but I have spent enough time for now on your problems; including rummaging through your pm'd code once before, even though I did not request it.
If there is a bug with GoScintilla then I will fix it, but I require a bug report with something I can reproduce and not your entire application sent to me. Problems with your application are, quite honestly, not my concern. Post in the coding forums and if I have time then I shall take a look. Others might also be tempted to take a look as well.
If there is a bug with GoScintilla then I will fix it, but I require a bug report with something I can reproduce and not your entire application sent to me. Problems with your application are, quite honestly, not my concern. Post in the coding forums and if I have time then I shall take a look. Others might also be tempted to take a look as well.
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.1 (Purebasic 4.5 only)
I just discovered GoScintilla. Looks great.
Thanks srod...
Thanks srod...
Re: GoScintilla - 2.1 (Purebasic 4.5 only)
hi srod,
i find something but i dont know this is a bug or have some work for every lang:
for statement in lua is ended with do but is a statement for examp :
do statement :
for statement :
so when i write a for statement in GoScintilla, it search for two end for folding instead of one, i think because of for and do in one line if not what is problem ?
thanks for your time.
i find something but i dont know this is a bug or have some work for every lang:
for statement in lua is ended with do but is a statement for examp :
do statement :
Code: Select all
do
-- Do Something
end
Code: Select all
for i=0, 10 do
-- Do Something
end
thanks for your time.
Sorry for my bad english.
Re: GoScintilla - 2.1 (Purebasic 4.5 only)
Not a bug, a limitation. GoScintilla allow's for multiple open-fold / close-fold keywords on the same line etc.
You would have to remove either the keyword 'do' or 'for' from code folding and then use a user-defined line styling function to deal with the removed keyword etc.
You would have to remove either the keyword 'do' or 'for' from code folding and then use a user-defined line styling function to deal with the removed keyword etc.
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.1 (Purebasic 4.5 only)
@Peyman : I have updated GoScintilla 2 (version 2.2) to offer you a part solution for your predicament which means that you may not have to resort to a user-defined line styling function.
I have added a new keyword style : #GOSCI_OPENFOLDKEYWORDNOPRECEDING. This marks a keyword (or multiple keywords) as an open-fold keyword with the proviso that it will only open a new fold on any given line if this symbol is not preceded by any other open-fold keyword. That is, if the line is not already marked as being the start of a new fold etc.
This should solve your problem.
I say 'should' because GoScintilla does not respect line separators such as the ':' symbol which we can use with Purebasic. This means that, for example, in the following line :
if 'do' is marked as a #GOSCI_OPENFOLDKEYWORDNOPRECEDING keyword then the 2nd 'do' on the first line will not contribute an additional open-fold even though it is (because of the : ) essentially on a new line etc.
Course I do not know if LUA supports this kind of thing anyhow!
I will probably modify GoScintilla at some point so that it does recognise line separators, but it is not something I am in need of right now.
I hope this helps?
@ALL : new version of GoScintilla 2 is available... as described above!
I have added a new keyword style : #GOSCI_OPENFOLDKEYWORDNOPRECEDING. This marks a keyword (or multiple keywords) as an open-fold keyword with the proviso that it will only open a new fold on any given line if this symbol is not preceded by any other open-fold keyword. That is, if the line is not already marked as being the start of a new fold etc.
This should solve your problem.
I say 'should' because GoScintilla does not respect line separators such as the ':' symbol which we can use with Purebasic. This means that, for example, in the following line :
Code: Select all
for i=0, 10 do : do
-- Do Something
end : end
Course I do not know if LUA supports this kind of thing anyhow!

I will probably modify GoScintilla at some point so that it does recognise line separators, but it is not something I am in need of right now.
I hope this helps?
@ALL : new version of GoScintilla 2 is available... as described above!

I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)
@srod : Thanks many times, this new flag very can help,
and yea in lua this possible with ';' so code is
Another time thanks.
and yea in lua this possible with ';' so code is
Code: Select all
for i=0, 10 do ; do
-- Do Something
end ; end
Sorry for my bad english.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)
How to make a block with the comment:
Rem
comment
comment
comment
EndRem
Sorry my bad English.
Rem
comment
comment
comment
EndRem
Sorry my bad English.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)
You need a user-defined line styling function.
See the AdvancedDemos\BlockComments\BlockCommentStyler.pb demo.
This one uses c-style block comments. Should be easy to alter to give what you are after.
See the AdvancedDemos\BlockComments\BlockCommentStyler.pb demo.
This one uses c-style block comments. Should be easy to alter to give what you are after.
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)
It will be difficult. It is a pity that there is no ready-made functions.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)
Scintilla is a complicated beastie and the business of syntax styling and the like is... not easy! At the end of the day there are only so many functions and so much functionality I can add to GoScintilla before it becomes just as difficult to use as Scintilla itself and GoScintilla cannot possibly cater for every possible situation etc. I think it does okay in its present form.Szafir wrote:It will be difficult. It is a pity that there is no ready-made functions.
Beside's, with a user-defined line styling function there is literally nothing you cannot do. You just have to roll your sleeves up and study the demos which use such functions. You may even need to read up a little on the Scintilla api as well, but that's the price of being a developer I'm afraid.
Treat it as a learning experience.

I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)
GoScintilla is really easy, it is better not to complicate it too much.
I am using GoScintilla write a small project: BMIde - Mini BlitzMax Editor.

I am using GoScintilla write a small project: BMIde - Mini BlitzMax Editor.

Re: GoScintilla - 2.2 (Purebasic 4.5 only)
Looks nice - well done.
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.2 (Purebasic 4.5 only)

here is a PB syntax advanced demo.

- Hex number style
- Binary number style
- .Structure style
- Procedure style
- Procedure region highlighting
- Custom code folding between ;{ and ;} markers
Code: Select all
Procedure GOSCI_SetLineHighlightColor(id, color)
Procedure GOSCI_SetLineHighlighted(id, lineIndex, flag=#True)


how to detect scn_modified
Hello,
Sorry if my question is already solved :
How can i know if the text in my scintilla gadget is modified ?
Sorry if my question is already solved :
How can i know if the text in my scintilla gadget is modified ?
Re: how to detect scn_modified
drgolf wrote:Hello,
Sorry if my question is already solved :
How can i know if the text in my scintilla gadget is modified ?
Code: Select all
ProcedureDLL ScintillaCallBack(Gadget, *scinotify.SCNotification)
Select *scinotify\nmhdr\code
Case #SCN_MODIFIED
Debug "modified"
EndSelect
EndProcedure
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.
