|
Post by Robert on Oct 19, 2023 11:29:52 GMT -5
George, I have a large macro file that I often view, but rarely change. So, I set up an EFT entry so that when I click on the name, it defaults to MODE VIEW.
Recently, I needed to make some minor changes to this file. I issued MODE EDIT to allow the changes to be made, and then did a SAVE.
The SAVE worked, but immediately after the save was done, the edit session reverted to MODE VIEW. It appears that the MODE won't last past the next SAVE.
I wish this MODE override would stay the way I altered it with the primary command, and not reset itself to the EFT override setting, at least until the edit session in question was closed.
Or, was this behavior intentional? I looked at the Help for MODE and this temporary nature the MODE command isn't mentioned.
R
|
|
|
Post by George on Oct 19, 2023 15:20:22 GMT -5
Robert: OUCH! This ends up being VERY VERY hairy.
What happens is: * Your EFT override to MODE VIEW does it's job.
* The MODE EDIT does it's job.
* SAVE now is allowed, but SAVE, trying to be perfect before the file write, always re-fetches the Profile data + EFT OVERRIDES before saving.
* But that last act re-established VIEW mode.
This calls into question all Profile commands issued after the file is loaded. I'm going to have to review all this. Maybe SAVE/CREATE/REPLACE/SAVEAS etc. should NOT be reloading Profile Data before the SAVE. But that may impact SAVE on MEDit sessions where the various files may have been loaded (and need saving under) different Profiles.
A nightmare, lots of code reading coming up.
George
|
|
|
Post by Robert on Oct 20, 2023 9:25:04 GMT -5
Wow, this is news to me. I *never* knew that SAVE would reload the profile.
Did you run into some glitch in the past where SAVE corrupted the profile? I am trying to understand why you would do this. Was there an actual reason, or were you being overly cautious?
R
|
|
|
Post by George on Oct 20, 2023 11:20:33 GMT -5
Robert: A couple versions ago, when EFT overrides came along, the whole handling of Profiles was revised - quite a major revision.
A SAVE should not have to re-load a Profile (other than MEdit SAVE where the files may have differing Profiles)
I'm going to walk the SAVE path and see where it decides to re-load. It's probably inadvertent due to the restructuring internally.
George
|
|
|
Post by Robert on Oct 20, 2023 12:33:14 GMT -5
Thanks for looking into this, George. You certainly have your hands full at the moment.
R
|
|
|
Post by George on Oct 20, 2023 13:14:56 GMT -5
Robert: It was triggered by the previous structural changes. Basically it's because SAVE handles both normal and MEdit sessions. And because MEdit sessions may contain files with different profiles, it has to switch back and forth as the save is done, switching filenames and, maybe, profiles.
Now throw in EFT overrides and the logic just wasn't up to it.
Hopefully now corrected.
One thing I noticed. If a file has an EFT override of MODE VIEW, and you switch to MODE EDIT (as you did), and THEN terminate with the tab still open in EDIT mode, the MRF list will cause the file to be re-opened in normal EDIT, as the MRF list reopens things AS THEY WERE at close. Yes, I know, a lot of - if this, if that, etc. but with flexibility comes possible confusion.
George
|
|
|
Post by Robert on Oct 20, 2023 14:35:18 GMT -5
Hmm, that's a lot of gymnastics there, George. I do wonder, if I were to have the scenario you last mention above, does that mean the MRF list (I assume this means the RECENT list, since I don't recall the acronym MRF appearing anywhere in the doc) doesn't look at the EFT? Or, DOES it look at EFT but doesn't process the Profile Overrides in that situation?
("oh what a tangled web we weave, when we practice to debug ...")
R ... color me confused ...
|
|
|
Post by George on Oct 20, 2023 15:15:54 GMT -5
Robert: I think the MRF opens just open in whatever they were at close. I'd have to check that. Yes, it gets very convoluted when you pile on 'features'.
George
|
|
|
Post by Robert on Oct 20, 2023 15:33:23 GMT -5
If the MRF list is used to re-open everything the same way as 'before', and bypasses a re-examination of the EFT and any overrides, this is a fairly important factoid that should be documented. To my knowledge, it hasn't been expounded upon in print, anywhere that I know of.
BTW, could you please clarify exactly what everybody means by MRF? Is it the list of files in the Recent FLIST? The Open FLIST? Some hidden list that I haven't bumped into yet at wild party one night? Hmm ...
R
|
|
|
Post by George on Oct 21, 2023 9:42:31 GMT -5
Robert: MRF (Most Recent Files) is the list of files that were open when =X / EXIT is issued. Nothing to do with the Recent Files FLIST. It's kept with the Instance data in the CFG file.
Since the MRF entry explicitly states the mode, that's how it is opened. It's like FM, if you simply SELECT a file, the Profile MODE will take effect. If you specifically choose it with an E, B or V command, then thats how it's opened.
I'll add some more words in the Doc. Under Starting and Stopping SPFLite.
George
|
|
|
Post by Robert on Oct 24, 2023 8:46:07 GMT -5
George, just wanted to let you know I tried the beta with this fix, and now issuing MODE EDIT in a file that had been opened with a MODE VIEW profile override in the EFT will retain the EDIT mode until END is issued. When edit is done next time, it goes back to VIEW.
In other words, it's working correctly. Thanks for delving into this. Wow, there sure were a lot of nit-picking changes to revamp Instances. This has been an interesting experience for us all.
R
|
|
|
Post by George on Oct 24, 2023 9:56:58 GMT -5
Robert: Yeah, I guess 'interesting' is a word that could be used for the head-banging I went through. As I've stated, SPFLite startup is a carefully constructed tower of pieces. There's a lot of "can't do this until that" where "that" can't be done until "something else". Avoiding deadlocks and impossibilities drives you nuts.
George
|
|
|
Post by Robert on Oct 24, 2023 10:41:05 GMT -5
Yes, avoiding deadlocks (and fixing them when you failed to avoid them) CAN drive you nuts.
However, since "impossibilities" are, by definition, impossible, avoiding them is a no-brainer.
R
|
|