Interactive PowerBasic Forum

IT-Consultant: José Roca (PBWIN 10+/PBCC 6+) (Archive only) => Legacy Software => Topic started by: José Roca on June 17, 2011, 02:17:20 AM

Title: SED Editor 2.03
Post by: José Roca on June 17, 2011, 02:17:20 AM
 
A programmer's editor for the PB/WIN and PB/CC compilers written by members of the PowerBASIC community. His names and contributions are specified in the SED History page of the help file. It uses Scintilla as the editing component.

Key Features


What is new in this version?

The main change has been to adapt the code to allow to compile it with PB 10 and my headers for that compiler. Other minor changes include that in this vrersion the PB reserved words are stored in the file SED_PB_KEYWORDS.TXT instead of listed in the source code.

Installation

To install the editor, just unzip the attached file(s) in the folder of your choice.

Attached files

SED203_Release: Contains the editor, the help file and the tools and DLLs.

SED203_Source: Contains the source code.
Title: Re: SED Editor 2.03
Post by: Paul Elliott on June 21, 2011, 02:44:46 PM
José,

Shouldn't the source zip be for v2.03? I keep getting v2.02 files.

No rush. Just curious.

Thanks.

Title: Re: SED Editor 2.03
Post by: José Roca on June 21, 2011, 03:26:06 PM
 
Sorry, I did attach the wrong file. New file uploaded.
Title: Re: SED Editor 2.03
Post by: Jaime de los Hoyos on July 05, 2011, 11:48:24 PM
Hi José,

I just downloaded this new version, and noticed that, when creating a new file and trying to save it I get the "Open..." dialog, making it impossible to save a new file.

I haven't yet taken a look into the source, but I think it must be some simple oversight...
Title: Re: SED Editor 2.03
Post by: José Roca on July 06, 2011, 04:41:36 AM
A silly mistake in AfxDialog.inc.


#IF %DEF(%UNICODE)
   MACRO AfxOpenFileDialog = AfxOpenFileDialogW
   MACRO OpenFileDialog = AfxSaveFileDialogW
#ELSE
   MACRO AfxOpenFileDialog = AfxOpenFileDialogA
   MACRO OpenFileDialog = AfxSaveFileDialogA
#ENDIF


should be


#IF %DEF(%UNICODE)
   MACRO AfxOpenFileDialog = AfxOpenFileDialogW
   MACRO OpenFileDialog = AfxOpenFileDialogW
#ELSE
   MACRO AfxOpenFileDialog = AfxOpenFileDialogA
   MACRO OpenFileDialog = AfxOpenFileDialogA
#ENDIF


New file uploaded.
Title: Re: SED Editor 2.03
Post by: José Roca on July 06, 2011, 04:46:10 AM
 
Thanks for your feedback.

I didn't notice it because I use CSED now. Also, instead of the wrapper OpenFileDialog I use now the CAfxFileDialog class.
Title: Re: SED Editor 2.03
Post by: Dubravko Tuckoric on July 06, 2011, 12:43:35 PM
José
It seems that source code is missing now. There are two exetutables with same name but different in size. Whitch is right ?
Did you posted corected AfxDialog.inc in your WINAPI suite ?

Title: Re: SED Editor 2.03
Post by: José Roca on July 06, 2011, 03:44:58 PM
Sorry, I did delete the wrong file. New files uploaded.

I will post a new version of the headers in a few days, when PBWin 10.02 will be released. There will be important new includes, such an OpenGL control and classes for ODBC ad GDI+.

I will also begin to post examples, now that both the compiler and the includes have all know bugs fixed.
Title: Re: SED Editor 2.03
Post by: Jaime de los Hoyos on July 06, 2011, 05:23:51 PM
Cool! Looking forward to that. Maybe it's finally time to do the switch to v10! (You sure all reported bugs were fixed, right? I don't know if previous versions' releases were like this, but this one sure was a bumpy ride...)

Thanks for all your fine work; gracias!!
Title: Re: SED Editor 2.03
Post by: Rick McNeely on July 06, 2011, 05:42:49 PM
Hey all,

I know that I can tell SED which compiler to use by default.  Can I have a PBCC program in one tab and a PBWin program in another and have each compile with the correct compiler without changing the default?  I thought maybe using the #compiler directive, but that doesn't seem to work.

Thanks

(SED is still the best IDE!)
Title: Re: SED Editor 2.03
Post by: José Roca on July 06, 2011, 06:02:35 PM
Add

'SED_PBCC

or

'SED_PBWIN

in capital letters somewhere at the beginning or your program.
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 06, 2022, 04:59:51 PM
Hello Jose

yes I like SED and i use it with FreeBasic too, i found others IDE-s editors to complex
for my taste ...

I have one question if is not problem

I don't understand even i am looking and looking into SED source  to
figure ..how you save line position  when switching between tabs ?

thanks
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 06, 2022, 05:04:28 PM
I mean i understand this part :

' // Retrieve the position and number of lines
   LOCAL curPos AS LONG
   LOCAL nLine  AS LONG
   LOCAL nLines AS LONG

   curPos = SCI_GetCurrentPos(pSed.hEdit)
   nLine = SCI_LineFromPosition(pSed.hEdit, curPos) + 1


but  don't get it where is stored ?
Title: Re: SED Editor 2.03
Post by: José Roca on December 06, 2022, 05:44:58 PM
It is not stored anywhere in the editor. The Scintilla control keeps track of it.
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 06, 2022, 07:35:05 PM
Quote
The Scintilla control keeps track of it.

ok...but how ?
i don't know for any container by Scintilla which do that?
I know that win api SetFocus enable visible caret
Title: Re: SED Editor 2.03
Post by: José Roca on December 06, 2022, 07:40:26 PM
How? You will have to loook in the code of the Scintilla control.
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 06, 2022, 07:46:58 PM
hmm
this must be some kind of craft
i found here typical tab selection only

' // Tab control selection changed
            CASE %TCN_SELCHANGE
               IF @pnmhdr.idFrom = %IDC_TABMDI THEN
                  ' // Identify the selected tab
                  nTab = TabCtrl_GetCurSel(pSed.hTabMdi)
                  ' // Activate the associated edit control
                  IF pSed.TabFilePaths.Count => nTab + 1 THEN
'                     vPath = pSed.TabFilePaths.Item(nTab + 1)
                     pTabFilePaths = pSed.TabFilePaths
                     vPath = pTabFilePaths.Item(nTab + 1)
                     CSED_TabMdiActivateWindow(VARIANT$$(vPath))
                  END IF
               END IF
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 06, 2022, 07:51:13 PM
I have saved each file path very similar like you made it in CSED
in my case each tab have array index same as tab
and that part work well but when i try to
store each line position in array i get always position 1
so focus is returned to line 1

sorry Jose i don't want to bothering you with all this
probably i am doing something wrong all the time .
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 07, 2022, 08:45:16 PM
I re - check again each step and found that i miss to setFocus on scintilla control
seems to me that now my way with array which hold line position work
Title: Re: SED Editor 2.03
Post by: José Roca on December 07, 2022, 11:28:02 PM
I don't understand why you like to complicate your life so much. The only thing that you need to do is to use SetFocus <handle of the Scintilla control>.
Title: Re: SED Editor 2.03
Post by: Zlatko Vid on December 08, 2022, 07:22:17 AM
I don't complicate at all...my code editor is really simple
setFous hsci was in my case on wrong place so that is why not work properly