Page 2 of 3

@ Keith

Posted: Fri May 23, 2003 7:31 pm
by fsw
Hi Keith,
I responded to your message, but the message is still in my outbox not in my sentbox.
So I don't know if you got it or not. (although the phpBB sytem tells me it's sent...)
Please tell me if you got it :roll:

Re: @ Keith

Posted: Fri May 23, 2003 7:53 pm
by GPI
>I responded to your message,

?! I doesn't write a message!

> but the message is still in my outbox not in my sentbox.

Nothing here. No PM, no E-Mail.
When you want to write me: caos.kin@freenet.de

About Tab: Here in German:
Makier mal den ganzen Text und drück dann tab. Jetzt schau dir die Einschübe ein. Tab hab ich auf 4 gestellt und vorher hab ich 2 Space für den Einschub verwendet. Nach TAB wird die Makierung neuformatiert und so haben die einschübe jetzts 4 Spaces. Kannst ja mal alle Spaces an anfang entferenen und dann alles makieren und TAB, alle wieder da.

Edit:
About GPI-Mod5b
I know :( And i don't know why? Under Win98SE no problems (ok, there a some problems). But when i write a new editor, then i write it complete new.

Re: @ Keith

Posted: Fri May 23, 2003 8:03 pm
by fsw
GPI wrote:>I responded to your message,

?! I doesn't write a message!

> but the message is still in my outbox not in my sentbox.

Nothing here. No PM, no E-Mail.
When you want to write me: caos.kin@freenet.de
Didn't know that your first name is Keith too. :wink:
Anyway, this post was not directed to you.
I got a personal message from Keith (new user) with this Forum (phpBB PureBasic Forum)
And I replied to it, that's all.
But I can't get the message out of my outbox (phpBB PureBasic Forum - NOT my email client).
So I don't know if he got my reply or not.
Maybe when he picks it up :?:
About Tab: Here in German:

Makier mal den ganzen Text und drück dann tab. Jetzt schau dir die Einschübe ein. Tab hab ich auf 4 gestellt und vorher hab ich 2 Space für den Einschub verwendet. Nach TAB wird die Makierung neuformatiert und so haben die einschübe jetzts 4 Spaces. Kannst ja mal alle Spaces an anfang entferenen und dann alles makieren und TAB, alle wieder da.
Thanks for this explanation. (Habs verstanden)

Bye

Franco
always :?

Re: @ Keith

Posted: Fri May 23, 2003 8:08 pm
by GPI
>Maybe when he picks it up :?:

It is moved, when he pick it up.

Posted: Sat May 24, 2003 5:52 pm
by Keith
Hi, I got the message, thanks for replying.

Posted: Sun May 25, 2003 4:19 pm
by GPI
Ok, i'm ready with the include-file for easier handle of the scintilla-"gadget".

It use now direct-calls and not the SendMessage system of windows, so it should be a little faster.

http://caosandkin.bei.t-online.de/pureb ... ntilla.zip

GPI

Posted: Sun May 25, 2003 8:37 pm
by GPI

Posted: Wed May 28, 2003 10:07 pm
by GPI
If somebody what to know: Folding works :)

Posted: Wed May 28, 2003 11:11 pm
by fsw
GPI wrote:If somebody what to know: Folding works :)
GOOD NEWS 8)
where is the learning code :wink:

GPI, I appreciated the last coloring code, but didn't had much time to look into it - your test code worked amazingly well though.


I'm working on the ability to edit more than one Source Code at the time (like the original PureBasicEditor).
After that is finished, I like to add the coloring stuff etc.

Don't know how it's done in the PureBasic's original editor to code on more than one file at the time (never looked deeper at the code), but Scintilla accepts only one "Scintilla" control at the time. (otherwise it crashes)
So if you want to have more than one file opened you have to do a lot of work (move the scintilla control to the desired PanelItem, copy source code text in memory back and forth, and keep track of all of this {is the text already modified?} - argh...)
Uff, the user activated to a different PanelItem - switch the source code...
The switching works amazingly fast though.

A big problem occures when you close a file that's not the last one.
Lets say you have 10 opened files and you close file 2.
When you remove PanelItem number 2 WindowsOS (or could it be Fred's GUI code?) automatically moves the PanelItem Text from 3 to 2, 4 to 3, 5 to 4 etc. (this means the PanelItem Index decreases automatically...)
But the Source Code inside the scintilla control on your panel remains, because YOU did the assignment....
So everytime you close a file you have to look if there is a used PanelItem with a higher number than the deleted one, and move all data to the lower PanelItem.

Well I got it working, but with one known bug:
If I kill Item number 2 then Item 3 becomes 2, 4 becomes 3 etc.
All PanelItem have the correct PanelItem Text and the Source Code except the new (reorganized) Panel 2 (the PanelItem Text is correct - done by WindowsOS or Fred) but the Source Code in Scintilla remains the old one (the memory transfer is done as first of all Items - so why it's wrong and all memory transfer done later (same Procedure) on the other Items are OK?).
All the other ones changed as desired... - arghh, my little brain hurts :?

Maybe I should look at the code of the original PureBasic Editor (but if there are more than one RichEdit Gadget in use, it's no help at all...)

GPI, if you want my code to elaborate on it, let me know.

Posted: Thu May 29, 2003 12:34 am
by fsw
got an :idea:

will keep you posted...

Posted: Thu May 29, 2003 1:22 am
by fsw
Moved the Scintilla Control back to the MainWindow instead of the PanelItem.
The Scintilla control is anyway always on the same spot!
And SciTe does the same.
The Panel now has only a height of 25 pixel...
Man, was I dumb...
Keep it Simple is better :roll:

Posted: Thu May 29, 2003 8:09 am
by GPI
Maybe you should realy look in the Editor-Code. (When you want to use the compiler, you must)

There also only a Panel-Gadget with a height about 20, so only the Tabs above appear. But the Editor open for ever new SourceCode a new RichEdit (So simple and so easy :). Everytime when you click on the panel-gadget, the old richedit would be hide and the new one will be showen.

But i posted, a code to get the Display-Window-Handles of the panel-gadget, so you can add a item, get the Display-Window-Handle and use this for a Scintella-Edit-window. So when the user switch between the codes, automatic the right sourcecode is activated. When you use my PBI, you should get the actual SCIEdi-Handle and call SCI_UseGadget(Sci-Edit-Handle), so all commands are send to the right Edit-gadget.

GPI

Posted: Thu May 29, 2003 5:05 pm
by fsw
GPI wrote:Maybe you should really look in the Editor-Code. (When you want to use the compiler, you must)
Yeah, I should.
There also only a Panel-Gadget with a height about 20, so only the Tabs above appear. But the Editor open for ever new SourceCode a new RichEdit (So simple and so easy :). Everytime when you click on the panel-gadget, the old richedit would be hide and the new one will be showen.
This is really easy...
But i posted, a code to get the Display-Window-Handles of the panel-gadget, so you can add a item, get the Display-Window-Handle and use this for a Scintella-Edit-window.
This is what I did :!:
Except that I used 1 Scintilla-Edit-Control and switched the source code back and forth.
So when the user switch between the codes, automatic the right sourcecode is activated. When you use my PBI, you should get the actual SCIEdi-Handle and call SCI_UseGadget(Sci-Edit-Handle), so all commands are send to the right Edit-gadget.
Do you say that you got more than 1 Scintilla-Edit-Control running at the time :?:
Hmm...
Have a nice day.
Well, what remains of it. You have already 18:00 and here it's 9:00 nice, dry and sunny :P

Posted: Thu May 29, 2003 5:18 pm
by fsw
fsw wrote: Do you say that you got more than 1 Scintilla-Edit-Control running at the time :?:
Hmm...
Just expanded your test code and I'm able to create a second Scintilla-Editor-Control.
The last time I tryed this (with my code) it didn't work, I must have done something wrong.
But this are really good news.
GPI, thanks for the hint.

Posted: Thu May 29, 2003 5:25 pm
by GPI
BTW: Here are my folding routines

http://caosandkin.bei.t-online.de/purebasic/fold.zip

Also there was some bugs in the coloring and indentation-functions.
( the if in "if (a=10)" had in the old version Procedure-Style, "" and '' wasn't handle correct in the indentation)

For the Fold, i used my own routines. Only Show/hide and SetExpanded (for the line when folded) are used.

The Circle-Mark is hidden in the final version and marks the end of a possible fold.

Ctrl+D works and you don't must in the head-line to fold.

GPI

p.s.: So now the big problem: Now i want to generate the wordlist (procedure, constants, etc. like in my mods). But this time, i don't want to scan the complete text, only the new / deleted lines...