Page 2 of 6

Posted: Wed Apr 23, 2008 11:25 am
by ts-soft
Scintilla is a great lib, but is not so easy. If you use finished lexer, like the
lexer from PB, you can not change the folding word, so you can not really
support PB 4.xx. Lexer not flexible. You can create your own lexer, but this
is hard stoff :wink:
RaEdit is more easy but have not all features of scintilla.
For your own scripting language or so, raedit is the better alternate.

I think, is a very usefull lib and we working to make it easier :wink:

greetings
Thomas

Posted: Wed Apr 23, 2008 11:37 am
by srod
Yes, this could be a very very useful addition to Purebasic. The only thing that bothers me at the moment about using Tailbitten libraries is the outstanding problem which exists between PB 4.2 and Tailbite regarding string functions etc.

Other than that, this is great work. Thanks a lot. :)

Posted: Wed Apr 23, 2008 11:37 am
by DoubleDutch
Agreed, I use Scintilla in Elementary Reports (not a code editor!) and it works great because its so flexible, but I would probabily use this as the editor for the DracScript section of the program.

Posted: Wed Apr 23, 2008 11:39 am
by DoubleDutch
SRod: Hopefully this will have been figured out and fixed by PB 4.2b5 .

Posted: Wed Apr 23, 2008 11:51 am
by ts-soft
srod wrote: The only thing that bothers me at the moment about using Tailbitten libraries is the outstanding problem which exists between PB 4.2 and Tailbite regarding string functions etc.
This lib is not Tailbiten. The userlib is written in C but we will change this in
the feature, pb-coding is much easier as C for us :)

Posted: Wed Apr 23, 2008 11:52 am
by srod
Ah, so you created the DESC file by hand etc. Very nice. That's one way of getting around the Tailbite problem! :)

Posted: Wed Apr 23, 2008 12:10 pm
by ts-soft
srod wrote:Ah, so you created the DESC file by hand etc. Very nice.
So easy is it not :wink:
See here a easy example of the source:

Code: Select all

#include <windows.h>

#include "..\include\PureLibrary.h"
#include "..\include\PureObject.h"
#include "..\include\PureGadget.h"
#include "..\include\RAEdit.h"


M_PBFUNCTION int PB_RaEditAddDefBlock2(int gadget,char *start,char *end,int flags)
{
	RABLOCKDEF bd;

	bd.lpszStart = start;
	bd.lpszEnd 	 = end;
	bd.lpszNot1  = "";
	bd.lpszNot2  = "";
	bd.flag		 = flags;

	return PB_RaEditSendMessage3(gadget,REM_ADDBLOCKDEF,0,&bd);
}

M_PBFUNCTION int PB_RaEditAddDefBlock(int gadget,char *start,char *end)
{
	return PB_RaEditAddDefBlock2(gadget,start,end,0);
}
This is the ansi-version of one function. Is one of the smallest :wink:

Posted: Wed Apr 23, 2008 12:12 pm
by srod
Rather you than me Thomas! :)

Did you not have access to the original ASM source? If so, could you not have used the ASM directly to create the user lib?

Posted: Wed Apr 23, 2008 12:19 pm
by ts-soft
> could you not have used the ASM directly to create the user lib?
i see no advantage in this. creating of gadgets is easier in c or pb than asm.
Supporting asm code is a fulltimejob :D

Posted: Wed Apr 23, 2008 12:31 pm
by srod
Have you converted the entire ASM library to C then or is the C code just a wrapper in order to create the user library? I notice the static .lib in the download package.

Posted: Wed Apr 23, 2008 12:43 pm
by ts-soft
The C Code is only to wrappe the static ASM lib from Ketilo.
This make a Gadget and some Gadgetfunction to easy work with it.

We can also faster update, if a new version of the lib on svn.

Posted: Wed Apr 23, 2008 12:48 pm
by srod
That's what I figured. :)

I can see a use for this already.

Posted: Thu Apr 24, 2008 7:58 pm
by hallodri
new version. no more a userlib, only as include.

Download under the same link
http://www.realsource.de/downloads/doc_ ... editgadget

Posted: Thu Apr 24, 2008 8:25 pm
by srod
Thanks for that; quite some work there! 8)

With the example though I am unable to affect the #STYLE_NOHSCROLL style either when creating the gadget or through SetGadgetAttribute() etc.

Also, I cannot collapse the Procedure block.

Posted: Thu Apr 24, 2008 8:39 pm
by rsts
Wow, Mr Soft :)

This going to make me re-think my rich text editing.

Thank you for ALL of your wonderful contributions.

cheers