|
Post by mueh on Jun 16, 2019 3:49:15 GMT -5
Hi George ! Opened new Thread since there is more than one Suggestion . It's up to you if you implement them because i can live with them .
1. FM requires STATE ON on in Default Profile to Display the LINES Count in FM . If you set STATE for Seleceted File type Profile as documented STATE file is created but lines do not Show up in FM . The LINE cmd also deletes the Color record in STATE File .
2. FM Line cmd ADD says File added even it is a non supported File type like %FDirUp %FPath %FProfile
METHOD FMLCmdAdd(i AS LONG)
CASE ELSE ' for not supported File types AFList(i).Msg = "Entry not added "+AFList(i).Flag+"|"+TRIM$(AFlist(i).FD.Filename)
DoSet(%Msg): MExitMeth ' Get msg issued if not done
3. Terminating SPFLite in maximized window looses ScrHeight and ScrWidth of normal window . Every time you Restart you have to Resize Normal Window .
_SPFLite.bas
SUB sResize(sMax AS STRING)
IF sMax = "M" THEN
sResizeWindow(mx, my) ' Go apply the new size values
ELSE '
sIniSetString("Screen", "ScrWidth", FORMAT$(ENV.ScrWidth)) ' Save the new values
sIniSetString("Screen", "ScrHeight", FORMAT$(ENV.ScrHeight)) sResizeWindow(0, 0) ' Go apply the new size values
END IF
Moving the sIniSetString to the Normal Window (Not Max ) Code should solve Problem . Thanks for great Product and the new nice Features comming .
|
|
|
Post by George on Jun 16, 2019 11:43:57 GMT -5
mueh: Items 1 I've corrected. The LINE command was loading the file in Quick mode (which bypasses STATE data). Then it called for a STATE write, thus losing all previous STATE info. Nasty one.
Item 2 I've added your code to correct it.
Item 3 is not that simple. Saving the width and height doesn't do it. In fact, if you look back a few lines, they have just been saved.
The problem is that when the Max button is first clicked, Windows sends the program a MAX notification, and WINDOWS saves the original Restore values somewhere for it's own use. If the Restore button is clicked, Windows sets the window to it's old values and tells the program a restore has been done.
All the program does in response to the Max/Restore messages, is fetch the current values that Windows has set, and adjust itself accordingly. I've never figured out how to get and save the Restore values around a program restart.
George
|
|
|
Post by mueh on Jun 17, 2019 2:27:59 GMT -5
Hi George !
Lets's clarify the item 3 .
Fix should MOVE the 2 sIniSetString as suggested above . There is no Need to save ScrHeight and ScrWidth for MAXIMIZED Screen in INI File .
If Maximized=1 in INI it starts up Maximized regardless what's in ScrHeight and Width .
What i forgot was LastScrX and LastScrY in INI which are modified during Termination to -9 in my case .
_DialogStuff.inc
'----- CLOSE button pressed
CASE %WM_CLOSE ' Sent when the Close button is pressed
IF CB.HNDL <> hWnd THEN GOTO DlgExit '
DIALOG GET LOC hWnd TO x, y ' Get location where window was
following line should only be excuted if not MAX screen .
ENV.LastScreenX = x: ENV.LastScreenY = y ' Save them away
This should result in folowing INI values which i prooved by editing them into INI .
Restart is Maximized and switch to Normal Window with Windows+Down Key gets now the normal window with this size and location .
[Screen]
ScrWidth=118
ScrHeight=37
Maximized=1
LastScrX=479
LastScrY=316
I think there is no need to save values in File as Robert suggested .
Just don't update above 4 Values in INI file if termination occures in MAXIMIZED Window .
Thanks for implementing the other 2 Suggestions .
|
|
|
Post by George on Jun 17, 2019 10:05:00 GMT -5
mueh:
In researching this, it turns out there is yet another Windows API for me to play with. Get/SetWindowPlacement. I've never encountered this API before, but it looks promising.
The problem has always been, not the saving of the info, but a means to tell Windows the Restore size even though the window has only been in Max mode. This API seems to allow that.
Stay tuned.
George
|
|
|
Post by mueh on Jun 18, 2019 3:28:23 GMT -5
Hi George ! Read the FM Macro Functions and i didn't find one Function . Is_Line_Cmd can be issued in FM but how to i Get the FNum of the line where the Macro was Executed and it's Parameter ? Up to now Get_Arg$(1) for Macro in FM line cmd returns Line Nr but no additional Parameter . If executed on FM cmd line i get back the Macro Parameter 's . It would be nice to allow Macro Parameters in FM if entered as line cmd and to have a FNum Col in FM Display . This would allow to enter 123 + PFK for MI . Macro MI could than execute COMPARE for Files of FNum of current line with FNum 123 . PFK for MI macro could look like (BackTab)(SetInsert)[MI ](Enter) Could you clarify how it will work in the future . Thanks
|
|
|
Post by mueh on Jun 18, 2019 9:58:15 GMT -5
Hi George !
This is the Current Code passing the parm .
METHOD FMLCmdProcess() AS LONG
CASE ELSE
IF IsMacro(LCmdOps(1)) THEN ' A macro file?
me.pCmdMacro(LCmdOps(1) + " " + FORMAT$(i)) ' Go do it Passing the complete lcmd would help .
|
|
|
Post by George on Jun 18, 2019 10:56:37 GMT -5
Actually, not passing the parameters is an Oops. Line macros will INSERT the line number in front of any other operands. I thought that's what it did till your comment, went and looked and yep! it was missing.
BTW - just how the heck did you get access to the source? This concerns me.
George
|
|
|
Post by George on Jun 18, 2019 10:58:26 GMT -5
Robert: No, numeric operands will not be supported.
|
|
|
Post by mueh on Jun 18, 2019 11:26:21 GMT -5
Don't worry . This is the 10.2.19129 source .
|
|
|
Post by George on Jun 18, 2019 12:13:28 GMT -5
mueh: Your estimate of what the coding looks like is eerily correct.
George
|
|
|
Post by mueh on Jul 8, 2019 2:09:28 GMT -5
Hi George ! Have some problem's with 11.0.19187
1. IS_Line is returned if Macro executed in FM cmd line after executed before as Line cmd . IS_Primary only reported after new start in FM .
2. Set_Line(0, can't be used to set cmd into cmd line . Worked in 10.2.19129 but now it's not allowed in FM . FMSET_Cmd(0, followed by Set_msg(4, doesn't show cmd in cmd line . SPF_Post_Do executes cmd . Need this feature for Command Retrieve macro ( like RETRIEVE cmd ) which set's cmd's from a file . Would you be so kind to add Set_Line(0, Set_Msg(4, trick to set cmd line to FMSet_Cmd .
3. Source Code 10.2.10129 11.0.19187 not shown on Web site
4. Macro Functional Detail use only half of screen with in Detailed desciption . Just Doc cosmetic .
All other functions i tried work perfect . Thanks for all this new Enhancements 5. Got another Problem with HEX ON . Edit any file f.e a macro which results in crash with 11.0.19187 SPFLite has encountered an execution exception (C0000005)
Last Interactions were:
KB Primitive: ENTER
Line Cmnd:
Primary Cmnd: cmd syn.bat "D:\xxx\" "C:\Users\MUEH\Documents\SPFLi110\"
Module Back Trace:
09 | DISPSCREEN
08 | DISPSCREEN
07 | SDOPENDINGTABSWITCH
06 | POSTKEYBOARD
05 | DISPSCREEN
04 | MAINDKEYPROCESS
03 | MAINDKEYPROCESS
02 | MAINDKEYPROCESS
01 | SRESIZEWINDOW
00 | SRESIZE
Note: A copy of this message is in: C:\Users\MUEH\Documents\SPFLi110\SPFLiteCrash.2019070814343900.txt
Hex OFF has to be set in Default Profile to be able to edit a file after restart .
|
|
|
Post by George on Jul 8, 2019 10:17:35 GMT -5
MUEH: Thanks, I'll start the chase. I do wish my testing was better, but there are just so many possible interactions I'd never get a release out, let alone live long enough to complete testing. And I've tried in the past asking for Beta testers, but got nothing but total silence in response.
The source is there, but the link isn't (yet - my oversight). You can get the download by copying some other link, and altering the version numbers.
George
|
|
|
Post by George on Jul 8, 2019 12:26:07 GMT -5
MUEH:
1. Is_Line and Is_Primary have been corrected.
2. Set_Line needed to be restricted in FM, but I went too far and totally banned it. The Set_Line(0...) option is back. It's being done a bit differently (for other reasons) and now appears as part of the command stacking processing (the cmd1;cmd2;cmd3 logic). Other changes prevented the old method of simply jamming it in.
I'm not sure about what you mean by FMSet_Cmd(0, ...) .. That will NOT set the primary command line, only Set_Line(0,...) will do so. And of course Set_Line(1+, ...) will not work in FM. But remember Set_Line was originally used to set an Edit data line, we kludged the 0=Command Line option)
3. I'll add the Source links to the web site.
4. It's narrow because all Doc is produced by HelpnDoc, there's one source document and HnD creates the CHM, PDF and HTML versions from the same source. If the table is widened, it ends up being truncated in the PDF version, so we're stuck with it this way.
5. HEX ON. Very big Oops there. Caused by the new PA1 support. Again, shows testing limitations.
I'll wait a bit longer for more bugs to show and then release a correction version ASAP.
George
|
|
|
Post by mueh on Jul 10, 2019 3:08:58 GMT -5
George: Thanks for above Solutions . When figuring out the difference between FMSet_Cmd and SPF_FMLCmd i noticed that all the error msg's ( f.e if fnum > afcount -1 ) are not shown when they occure . Shouldn't they use gMacroRC and gMacroMsg ?
There are also some Syntax error's in above 2 Macro description's . ONTHE Fm display as usual AN be canceled by in FMSet_Cmd Reported this since you explicitly asked for Doc Errors . Thanks
|
|
|
Post by mueh on Jul 10, 2019 8:26:58 GMT -5
Sorry George ! One more Problem . When misstyping some Macro Line cmd's in FM FilePath and correcting them with up down backspace i often get SPFLite has detected an internal loop
Last Interactions were: KB Primitive: LEFT Line Cmnd: Primary Cmnd:
Module Back Trace: 03 | FMKBCHAR 02 | MAINDKEYPROCESS 01 | SRESIZEWINDOW 00 | SRESIZE
Note: A copy of this message is in: C:\Users\MUEH\Documents\SPFLi110\SPFLiteCrash.2019071015152798.txt
Select OK, to ignore loop and continue execution, or Cancel to terminate the program Don't know exactly how to reproduce yet but will try to make a reproducable Scenario .
|
|