Post by George on Nov 17, 2020 16:51:33 GMT -5
CFGMaint -IMPORT opens a selection dialog at the 'SPFLite DATA folder' not the live SPFLite.CFG file location.
An Oops if switching from HomData to HomeFolder - corrected.
Update: After running Import and manually re-navigating the selection dialog to the correct place and then re-running Import again, the dialog opens to the correct place.
So I think the selection dialog simply opens to where-ever it opened last time, (possibly by another Windows application).
No, It was TOLD to open HomeData (incorrectly)
'Last-location' might just be a default if the specified location is invalid (missing quotes around filename with embedded blanks perhaps? My directory is "C:\$user\SPFLite CFG").
You may need to re-examine how you point it at the desired directory.
I also note that the selection dialog's 'Files of type' field shows EXPORT and will therefore include all files in that folder, because all relevant files are of type .TXT.
The file mask for the OpenFile dialog is "*EXP*.TXT" so it will not show ALL files.
I think you should rename the files so they end in .LOG and .EXP or even .EXPORT It discourages offline editing and users of CFGMaint should be expected to cope with this!
The "Files of Type" field can then be set appropriately so only files created by -EXPORT can be selected.
Sorry, I disagree, they are all TXT files, no need to pretend they're not.
BUGS - command line operands
(1) There is an error in the handling of the command line operands. I'm pretty sure it relates to trailing blanks.
I have experienced cases where the command syntax looks fine, but the pop-up message reads "Cancelled, Command line operand: is not recognized"
Got an example?
(2) If CFGMAINT is invoked with invalid operands (e.g. CFGMAINT RUBBISH), the Log file shows
CFGMaint - Log
CFGMaint - Temporary Log location set to: C:\Users\Stef\Desktop\
CFGMaint - Log file location is reset to: C:\$user\SPFLite Cfg\
CFGMaint - Cancelled, Command line operand: RUBBISH is not recognized
Switching between log destinations looks odd to a user - it does to this user, anyway.
Because there is no guarantee of ANYTHING when CFGMaint starts, it can't even tell where the LOG file should go. So it picks Desktop as an always available destination. As it bootstraps itself in, and finds a better, valid location, it switches to that. Yes it looks a bit odd, but I'd rather it logs what it's doing, that's what a log is for.
(3) The new argument -QUIET behaves inconsistently when dealing with an invalid command parameter
ie. CFGMaint -EXPOT -QUIET will issue a pop-up error msg, but
CFGMaint -QUIET -EXPOT will not issue a pop-up error msg.
I'll have a look, but until command line parsing is complete, you really can't expect a single operand from the command line to be having it's normal effect.
(4) It appears that the -EXPMAX operand is allowed with -IMPORT and -REPAIR also. Was that intended?
Should there be an upper limit to the -EXPMAX number?
For Import and Repair, yes EXPMAX is just noise. It's another case of parsing, order of operands, and just how far to go in coding to handle all user stupidities.
BUG
CFGMaint -IMPORT
(1) opens a pop-up window when complete, stating that "... n entries were corrected", but there is no LOG file to tell the user WHAT was corrected/changed.
There SHOULD be, I'll check into that, Sounds like a bug.
(2) There are inconsistencies between the export and import processes. Repeatable example:
(a) Export a file - no errors listed.
(b) Import the same file and the first message reads "Import file validation complete" and is followed by "CFG entries re-loaded successfully, 1 items were corrected".
(c) Repeat steps a & b and the same result persists. So what's being corrupted/changed and when?
What did the log say was corrected?
BUG
Following the IMPORT scenario above, I tested the -REPAIR option. There should not have been any errors. However,
CFGMAINT - REPAIR found that
Table: ODEFAULT, Entry LASTSCRY Contains an invalid value: -8 Replace with Default value: 5
As with IMPORT, there was no LOG file written to confirm this message / action taken.
Looks like the valid range for LASTSCRY needs to be adjusted.
I don't know what LASTSCRY is. I suspect it refers to window positioning.
My desktop extends across 2 displays and the SPFLite window could have been on either one of them or even straddle both.
On a subsequent repair attempt I received
Table: ODEFAULT, Entry SCRPOSITION Contains an invalid value: 1712,3207,-13,826 Replace with Default value: ?
I deliberately provoked the 2nd message by sliding the SPFLite window down so that the bottom edge of the window was off the 2nd display before closing SPFLite.
It might therefore be advisable NOT to flag such negative values as errors.
Not having the luxury of multiple displays, I can't even test this. I'll see if message suppression of some kind can be done.
I confirm that CFGMAINT now processes the 'live' CFG file for -EXPORT, -IMPORT, and -REPAIR.
Hope this helps.
Immensely, I can't thank you enough for doing all this and reporting the details so well.
Just an FYI, I'm tacking your DIFF suggestions. Interesting to say the least.
George
An Oops if switching from HomData to HomeFolder - corrected.
Update: After running Import and manually re-navigating the selection dialog to the correct place and then re-running Import again, the dialog opens to the correct place.
So I think the selection dialog simply opens to where-ever it opened last time, (possibly by another Windows application).
No, It was TOLD to open HomeData (incorrectly)
'Last-location' might just be a default if the specified location is invalid (missing quotes around filename with embedded blanks perhaps? My directory is "C:\$user\SPFLite CFG").
You may need to re-examine how you point it at the desired directory.
I also note that the selection dialog's 'Files of type' field shows EXPORT and will therefore include all files in that folder, because all relevant files are of type .TXT.
The file mask for the OpenFile dialog is "*EXP*.TXT" so it will not show ALL files.
I think you should rename the files so they end in .LOG and .EXP or even .EXPORT It discourages offline editing and users of CFGMaint should be expected to cope with this!
The "Files of Type" field can then be set appropriately so only files created by -EXPORT can be selected.
Sorry, I disagree, they are all TXT files, no need to pretend they're not.
BUGS - command line operands
(1) There is an error in the handling of the command line operands. I'm pretty sure it relates to trailing blanks.
I have experienced cases where the command syntax looks fine, but the pop-up message reads "Cancelled, Command line operand: is not recognized"
Got an example?
(2) If CFGMAINT is invoked with invalid operands (e.g. CFGMAINT RUBBISH), the Log file shows
CFGMaint - Log
CFGMaint - Temporary Log location set to: C:\Users\Stef\Desktop\
CFGMaint - Log file location is reset to: C:\$user\SPFLite Cfg\
CFGMaint - Cancelled, Command line operand: RUBBISH is not recognized
Switching between log destinations looks odd to a user - it does to this user, anyway.
Because there is no guarantee of ANYTHING when CFGMaint starts, it can't even tell where the LOG file should go. So it picks Desktop as an always available destination. As it bootstraps itself in, and finds a better, valid location, it switches to that. Yes it looks a bit odd, but I'd rather it logs what it's doing, that's what a log is for.
(3) The new argument -QUIET behaves inconsistently when dealing with an invalid command parameter
ie. CFGMaint -EXPOT -QUIET will issue a pop-up error msg, but
CFGMaint -QUIET -EXPOT will not issue a pop-up error msg.
I'll have a look, but until command line parsing is complete, you really can't expect a single operand from the command line to be having it's normal effect.
(4) It appears that the -EXPMAX operand is allowed with -IMPORT and -REPAIR also. Was that intended?
Should there be an upper limit to the -EXPMAX number?
For Import and Repair, yes EXPMAX is just noise. It's another case of parsing, order of operands, and just how far to go in coding to handle all user stupidities.
BUG
CFGMaint -IMPORT
(1) opens a pop-up window when complete, stating that "... n entries were corrected", but there is no LOG file to tell the user WHAT was corrected/changed.
There SHOULD be, I'll check into that, Sounds like a bug.
(2) There are inconsistencies between the export and import processes. Repeatable example:
(a) Export a file - no errors listed.
(b) Import the same file and the first message reads "Import file validation complete" and is followed by "CFG entries re-loaded successfully, 1 items were corrected".
(c) Repeat steps a & b and the same result persists. So what's being corrupted/changed and when?
What did the log say was corrected?
BUG
Following the IMPORT scenario above, I tested the -REPAIR option. There should not have been any errors. However,
CFGMAINT - REPAIR found that
Table: ODEFAULT, Entry LASTSCRY Contains an invalid value: -8 Replace with Default value: 5
As with IMPORT, there was no LOG file written to confirm this message / action taken.
Looks like the valid range for LASTSCRY needs to be adjusted.
I don't know what LASTSCRY is. I suspect it refers to window positioning.
My desktop extends across 2 displays and the SPFLite window could have been on either one of them or even straddle both.
On a subsequent repair attempt I received
Table: ODEFAULT, Entry SCRPOSITION Contains an invalid value: 1712,3207,-13,826 Replace with Default value: ?
I deliberately provoked the 2nd message by sliding the SPFLite window down so that the bottom edge of the window was off the 2nd display before closing SPFLite.
It might therefore be advisable NOT to flag such negative values as errors.
Not having the luxury of multiple displays, I can't even test this. I'll see if message suppression of some kind can be done.
I confirm that CFGMAINT now processes the 'live' CFG file for -EXPORT, -IMPORT, and -REPAIR.
Hope this helps.
Immensely, I can't thank you enough for doing all this and reporting the details so well.
Just an FYI, I'm tacking your DIFF suggestions. Interesting to say the least.
George