From: Ezra B. <ezr...@us...> - 2008-06-30 02:59:08
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29977/apps/Win32ForthIDE Modified Files: CommandID.f EdCommand.f EdFORTHFORM.F EdFormWindow.f EdMenu.f EdNavigator.f EdStatusbar.f EdToolbar.f EdVersion.f FORMOBJECT.F Main.f Log Message: Bug fix. LoadSession and SaveSeesion now saves the entire IDE session. Little enhancement to Project Navigator. Index: EdVersion.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdVersion.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EdVersion.f 28 Apr 2008 05:17:16 -0000 1.8 --- EdVersion.f 30 Jun 2008 02:59:04 -0000 1.9 *************** *** 1,5 **** \ $Id$ ! 10206 value sciedit_version# \ Version numbers: v.ww.rr --- 1,5 ---- \ $Id$ ! 10208 value sciedit_version# \ Version numbers: v.ww.rr *************** *** 295,296 **** --- 295,306 ---- Tuesday, April 22 2008 - Made the Form Designer Window floatable. Selectable from Preferences dialog. + + \ changes for version 1.02.07 + Changes to messaging system by Camille Doiteau + Reset before compile no longer necessary. + + \ changes for version 1.02.08 + EAB Saturday, June 21 2008 + - Modified SaveSession & LoadSession to save and load current project and any + files open in the IDE in addition to forms. + - Project Navigator now finds vector table constants i.e from SetCommand Index: EdFORTHFORM.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdFORTHFORM.F,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EdFORTHFORM.F 4 May 2008 18:13:25 -0000 1.3 --- EdFORTHFORM.F 30 Jun 2008 02:59:04 -0000 1.4 *************** *** 463,466 **** --- 463,490 ---- then ; + : Project= ( -- ) \ open project file + 0 word dup c@ + if IDM_OPEN_RECENT_FILE_PRJ DoCommand + else drop + then ; + create buf 200 allot + : File= { \ tmp# -- } ( <name> -- ) \ get file name from input stream + -1 to tmp# + ',' word dup c@ + if count buf dup>r place + more? + if 0 word count number? + if drop to tmp# + else 2drop + then + then r@ count file-status nip 0= \ if still exist + if r@ IDM_OPEN_RECENT_FILE DoCommand \ open it + tmp# -1 <> + if tmp# GotoPos: CurrentWindow + then + then r>drop + else drop + then ; + : ?addext { fname -- fname } fname c@ *************** *** 469,506 **** then then fname ; ! handle sfile : LoadSession ( -- ) GetHandle: MainWindow Start: OpenSessionDlg dup c@ ! if nostack1 ['] $fload catch ! s" Session load aborted!" ?MessageBox else drop then ; IDM_FORM_LOADSESSION SetCommand ! : ?write-error ( f -- ) \ if flag is true display message and close file ! if true s" Error writing session file!" ?MessageBox ! sfile close-file drop ! then ; ! ! : write-formfiles { \ err -- f } \ write any forms opened, f=true=error, ! 0 to err #Forms ?dup if >FirstLink: FormList 1+ 1 ! do s" Form= " sfile write-file >r ! Data@: FormList GetFileName: [ ] ! sfile write-line r> or dup to err ?leave >NextLink: FormList loop ! then err dup ?write-error ; : SaveSession ( -- ) \ save current state of system ! GetHandle: MainWindow Start: SaveSessionDlg ?addext count ?dup ! if r/w create-file swap to sfile dup ?write-error ?exit \ create ! write-formfiles ?exit \ do this first so that if we try loading a session ! sfile close-file drop else drop then ; IDM_FORM_SaveSession SetCommand editor definitions \ as we were \s --- 493,579 ---- then then fname ; ! ! : (LoadSession) ( filename$ -- ) ! nostack1 ['] $fload catch ! s" Session load aborted!" ?MessageBox ! ; : LoadSession ( -- ) GetHandle: MainWindow Start: OpenSessionDlg dup c@ ! if (LoadSession) else drop then ; IDM_FORM_LOADSESSION SetCommand ! : write-formfiles ( -- ) \ write any forms opened, #Forms ?dup if >FirstLink: FormList 1+ 1 ! do s" Form= " append ! Data@: FormList GetFileName: [ ] append&crlf >NextLink: FormList loop ! then ; ! ! : write-projectfile ( -- ) ! GetProjectFileName: TheProject ?dup ! if s" Project= " append ! append&crlf ! else drop false ! then ; ! ! : write-openfiles { \ flag ThisChild -- f } ! false to flag ! GetTabCount: OpenFilesTab dup 0> ! if 1+ 0 ! do TCIF_PARAM IsMask: OpenFilesTab ! i GetTabInfo: OpenFilesTab ! Lparam: OpenFilesTab dup to ThisChild ! if GetFileName: ThisChild dup ! count "TO-PATHEND" s" <Untitled>" istr= not ! if s" File= " append ! count append ! GetFileType: ThisChild FT_SOURCE = ! if ',' cappend ! ChildWindow: ThisChild ! GetCurrentPos: [ ] (.) append&crlf ! else +crlf ! then ! else drop ! then ! then ! loop ! else drop ! then ; ! ! : (SaveSession) ( filename$ -- ) ! count SetName: TheFile ! Create: TheFile ?exit ! initbuffer ! write-projectfile ! write-openfiles ! write-formfiles ! TheBuffer Write: TheFile drop ! Close: TheFile ! ; : SaveSession ( -- ) \ save current state of system ! GetHandle: MainWindow Start: SaveSessionDlg ?addext dup c@ ! if (SaveSession) else drop then ; IDM_FORM_SaveSession SetCommand + create DefaultSessionFile ," Win32ForthIDE.SES" + + : SaveDefaultSession ( -- ) + DefaultSessionFile count Prepend<Home>\ new$ dup>r place + r> (SaveSession) ; IDM_SAVEDEFAULT_SESSION SetCommand + + : LoadDefaultSession ( -- ) + DefaultSessionFile count Prepend<Home>\ new$ dup>r place + r@ count file-status nip 0= \ if it exists + if r@ (LoadSession) + else true s" No default session file saved!" ?MessageBox + then r>drop ; IDM_LOADDEFAULT_SESSION SetCommand + editor definitions \ as we were \s Index: EdMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdMenu.f,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** EdMenu.f 18 Jun 2008 10:56:31 -0000 1.25 --- EdMenu.f 30 Jun 2008 02:59:04 -0000 1.26 *************** *** 176,179 **** --- 176,182 ---- MenuItem "IDE &Preferences" IDM_PREFERENCES DoCommand ; MenuSeparator + MenuItem "Save Current Session" IDM_SAVEDEFAULT_SESSION DoCommand ; + MenuItem "Reload Session" IDM_LOADDEFAULT_SESSION DoCommand ; + MenuSeparator :MenuItem mp_showsb "&Show Statusbar" IDM_SHOW_STATUSBAR DoCommand ; :MenuItem mp_showtb "&Show Toolbar" IDM_SHOW_TOOLBAR DoCommand ; *************** *** 185,189 **** :MenuItem mp_compile "&Compile\tF12" IDM_COMPILE DoCommand ; :MenuItem mp_compileSel "Compile selected &text" IDM_COMPILE_SELECTION DoCommand ; ! :MenuItem mp_reset "&Reset" IDM_RESET_CON_IO DoCommand ; MenuSeparator :MenuItem mp_setbp "&Set breakpoint...\tCTRL+B" IDM_SET_BREAK_POINT DoCommand ; --- 188,192 ---- :MenuItem mp_compile "&Compile\tF12" IDM_COMPILE DoCommand ; :MenuItem mp_compileSel "Compile selected &text" IDM_COMPILE_SELECTION DoCommand ; ! \ :MenuItem mp_reset "&Reset" IDM_RESET_CON_IO DoCommand ; MenuSeparator :MenuItem mp_setbp "&Set breakpoint...\tCTRL+B" IDM_SET_BREAK_POINT DoCommand ; *************** *** 464,468 **** CompileProject? Check: mp_compileproject Compile? Enable: mp_compile ! true Enable: mp_reset ActiveChild 0<> dup Enable: mf_saveall --- 467,471 ---- CompileProject? Check: mp_compileproject Compile? Enable: mp_compile ! \ true Enable: mp_reset ActiveChild 0<> dup Enable: mf_saveall Index: EdToolbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdToolbar.f,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** EdToolbar.f 30 Dec 2007 03:53:20 -0000 1.12 --- EdToolbar.f 30 Jun 2008 02:59:04 -0000 1.13 *************** *** 398,413 **** if GetFileType: ActiveChild FT_SOURCE = if ! ?Modified: ActiveChild 0<> ?BrowseMode: ActiveChild not and IDM_SAVE EnableButton: ControlToolbar ! ?Selection: ActiveChild IDM_CUT EnableButton: ControlToolbar ! ?Selection: ActiveChild IDM_COPY EnableButton: ControlToolbar ! CanPaste: ActiveChild IDM_PASTE EnableButton: ControlToolbar ! CanUndo: ActiveChild IDM_UNDO EnableButton: ControlToolbar ! CanRedo: ActiveChild IDM_REDO EnableButton: ControlToolbar ! GetTextLength: ActiveChild IDM_FIND_TEXT EnableButton: ControlToolbar ! ?Find: ActiveChild IDM_FIND_NEXT EnableButton: ControlToolbar ! ?Find: ActiveChild IDM_FIND_PREVIOUS EnableButton: ControlToolbar ! GetTextLength: ActiveChild IDM_REPLACE_TEXT EnableButton: ControlToolbar ! ! GetTextLength: ActiveChild IDM_BROWSE EnableButton: ControlToolbar else false IDM_SAVE EnableButton: ControlToolbar --- 398,412 ---- if GetFileType: ActiveChild FT_SOURCE = if ! ?Modified: ActiveChild 0<> ?BrowseMode: ActiveChild not and IDM_SAVE EnableButton: ControlToolbar ! ?Selection: ActiveChild IDM_CUT EnableButton: ControlToolbar ! ?Selection: ActiveChild IDM_COPY EnableButton: ControlToolbar ! CanPaste: ActiveChild IDM_PASTE EnableButton: ControlToolbar ! CanUndo: ActiveChild IDM_UNDO EnableButton: ControlToolbar ! CanRedo: ActiveChild IDM_REDO EnableButton: ControlToolbar ! GetTextLength: ActiveChild IDM_FIND_TEXT EnableButton: ControlToolbar ! ?Find: ActiveChild IDM_FIND_NEXT EnableButton: ControlToolbar ! ?Find: ActiveChild IDM_FIND_PREVIOUS EnableButton: ControlToolbar ! GetTextLength: ActiveChild IDM_REPLACE_TEXT EnableButton: ControlToolbar ! GetTextLength: ActiveChild IDM_BROWSE EnableButton: ControlToolbar else false IDM_SAVE EnableButton: ControlToolbar Index: EdStatusbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdStatusbar.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EdStatusbar.f 13 Jan 2007 02:20:10 -0000 1.5 --- EdStatusbar.f 30 Jun 2008 02:59:04 -0000 1.6 *************** *** 90,95 **** then GetProjectFileName: TheProject ?dup if s" Project File: " pad place "to-pathend" pad +place pad +null ! else pad off ! then pad 1+ projpart SetText: self r> base ! ;M --- 90,95 ---- then GetProjectFileName: TheProject ?dup if s" Project File: " pad place "to-pathend" pad +place pad +null ! else drop pad off ! then pad 1+ projpart SetText: self r> base ! ;M Index: EdCommand.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdCommand.f,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** EdCommand.f 18 Jun 2008 10:56:31 -0000 1.13 --- EdCommand.f 30 Jun 2008 02:59:04 -0000 1.14 *************** *** 418,422 **** msgpad dup c@ 1+ WM_WORDHELP w32fHelp Sendw32fMsg 0= \ if not in help database, show source ! if cfa get-viewfile drop count rot msgpad ! dup 1+ >r msgpad cell+ place --- 418,424 ---- msgpad dup c@ 1+ WM_WORDHELP w32fHelp Sendw32fMsg 0= \ if not in help database, show source ! if cfa ! \in-system-ok get-viewfile ! drop count rot msgpad ! dup 1+ >r msgpad cell+ place Index: EdNavigator.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdNavigator.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EdNavigator.f 29 Jun 2008 05:00:46 -0000 1.3 --- EdNavigator.f 30 Jun 2008 02:59:04 -0000 1.4 *************** *** 43,46 **** --- 43,47 ---- create currentname max-path allot -1 value markerhandle + create lastword$ 0 , 100 allot \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 363,366 **** --- 364,368 ---- AddMethod: Self ; + : ?add-word ( a -- ) comment? if drop exit then *************** *** 394,402 **** --- 396,412 ---- s" enum:" "of in-definition? not to in-enum? EndOf + s" setcommand" "of lastword$ uppercase count + currentname place \ any vector tables + _constant to code-id + AddData: Self EndOF in-enum? if count currentname place _constant to code-id AddData: Self false + then dup + if count lastword$ place \ save word + false then + EndCase ; Index: Main.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/Main.f,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Main.f 29 Jun 2008 05:00:46 -0000 1.49 --- Main.f 30 Jun 2008 02:59:04 -0000 1.50 *************** *** 120,133 **** WinSplitter Splitter - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ the tabulator control for the left part of the window - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - - needs EdTabControl.f - needs EdPreferences.f - needs EdReplace.f - - TabWindow cTabWindow - \ **************** Tab Windows for the Editor ***************************** --- 120,123 ---- *************** *** 209,212 **** --- 199,213 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + \ the tabulator control for the left part of the window + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + + needs EdTabControl.f + needs EdPreferences.f + needs EdReplace.f + + TabWindow cTabWindow + + + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ Define the left part of the splitter window. In this window a \ Tab Control will be used to show the open files the Class Browser and *************** *** 1214,1218 **** start: Frame GetHandle: frame hwndOwner ! DefaultPrinter \ initialise PSD and PD ! sysgen if GetHandle: Frame Enablew32fMsg then comment: [cdo] init-shared-type --- 1215,1219 ---- start: Frame GetHandle: frame hwndOwner ! DefaultPrinter \ initialise PSD and PD ! \+ sysgen GetHandle: Frame Enablew32fMsg comment: [cdo] init-shared-type *************** *** 1246,1250 **** \ create win32forthIDE.exe in the Win32Forth folder &forthdir count &appdir place ! \ [cdo] set shared memory parameters w32fIDE to NewAppID true to RunUnique --- 1247,1251 ---- \ create win32forthIDE.exe in the Win32Forth folder &forthdir count &appdir place ! \ [cdo] w32fIDE to NewAppID true to RunUnique Index: FORMOBJECT.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/FORMOBJECT.F,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FORMOBJECT.F 4 May 2008 18:13:25 -0000 1.2 --- FORMOBJECT.F 30 Jun 2008 02:59:04 -0000 1.3 *************** *** 1008,1014 **** then ;M :M Init: ( -- ) ! 350 to frmXPos ! 175 to frmYPos 350 to frmWidth 200 to frmHeight --- 1008,1027 ---- then ;M + : ?init-position ( -- x y ) \ initial position of form + \ if detached designer window open forms near form window + \ e.g when using a second monitor + detached? + if GetWindowRect: DetachedFormWindow 4dup d= not \ valid? + if drop 2 pick - cell+ under+ \ a little from end + >r screen-size >r over <= \ don't + if 2/ \ position + then r> r> tuck <= \ off screen + if 2/ + then exit + then 4drop + then 350 175 ; + :M Init: ( -- ) ! ?init-position to frmYPos to frmXPos 350 to frmWidth 200 to frmHeight Index: CommandID.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/CommandID.f,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CommandID.f 16 Jun 2008 04:17:31 -0000 1.15 --- CommandID.f 30 Jun 2008 02:59:04 -0000 1.16 *************** *** 91,94 **** --- 91,96 ---- NewID IDM_COMPILE_PROJECT NewID IDM_PREFERENCES + NewID IDM_SAVEDEFAULT_SESSION + NewID IDM_LOADDEFAULT_SESSION \ Win32Forth menu Index: EdFormWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/EdFormWindow.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EdFormWindow.f 28 Apr 2008 05:17:16 -0000 1.1 --- EdFormWindow.f 30 Jun 2008 02:59:04 -0000 1.2 *************** *** 502,505 **** --- 502,508 ---- position-windows Paint: Parent \ refresh tab control + Paint: TopPane + Paint: BottomPane + Paint: SplitterH ;M |