|
Post by mueh on Oct 11, 2023 2:03:35 GMT -5
Hi George ! ALL END or CAN is a good feature . When it is done and MEDIT session is active there is crash in DOCMDINOTHERTAB on second END . Since each MEDIT file is in OPEN list i think you are issuing END for already closed TAB . Maybe you should refresh you list after END for MEDIT Tab is done .
Just another concern : FM CUT APPEND RAW or CUT RAW save now the lines but msg "C/CC can only be used with CUT command" is still occuring . Thanks
P.S. Just my opinion to new INST cmd . It's not very useful since it must be issued in FM , requires CAN or END which terminates all active tabs nor does it allow -DO -OPENLIST parameter and starts Instance with SPFLite2.exe . I think it should use exe name of the SPFLlite where INST is issued . ( Use different Name for Beta ) . Is see no need to terminate all Tabs . On INST back you just start with no open tabs .
Excute a do file with 'cmd start "" /B WW30D.bat 500 -I DACLONE -DO openlist -O D:\openlistM;=X'
where 500 is some delay in bat file in case you want to restart the running instance . (this delay of course doesn't work if =X requires replies to popup's . I will think of a Thinbasic pgm in BAT which will ensures with WIN_FindByTitle that Instance is not longer active before SPFLite INSTANCE is started ) . This will work also in EDIT session .
Maybe thats an ERROR that END or CAN is required since doc says they are optional ? Hmmm! INST with CANCEL doesn't close the tabs .
|
|
|
Post by George on Oct 11, 2023 8:39:31 GMT -5
MUEH: Thanks for all the feedback, I put this out early just to get such comments. I knew INSTANCE was not really 'done'.
I'll start working through them.
George
|
|
|
Post by George on Oct 11, 2023 12:13:24 GMT -5
MUEH: Corrected closing MEdit sessions will ALL END/CAN
Corrected CC/CC CUT APPEND (again! - have to track my multiple versions better)
INST can now be issued in any tab.
INST will re-use the running EXE for the restart
I'm afraid I simply cannot swap Instances and keep open edit tabs alive, they must be closed, therefor the option to CAN or END them. If no other tabs are open, the CAN/EDIT need not be entered, that's why they're marked as [ CAN | EDIT ]. The only other option is to just abandon them, including any unsaved sessions. Not a great idea.
What is -DO OPENLIST ? Do you have an OPENLIST alias, or Macro?
I can easily add other operands to provide for specifying an OpenList and DO operands.
How about: INSTANCE -I instance-name -O openlist-filename -D do-macro [ CAN | END ] (Similar to the CmdLine operands)
Although this is getting 'wordy'. Maybe we can make some kind of standard that, if an instance.DO macro exists it will be automatically added. Similarly for openlist, but we'd have to standardize the filename and where it's stored. That way just entering INSTANCE instance-name [ CAN | END ] would bring all 3 in.
Thoughts?
George
|
|
|
Post by mueh on Oct 11, 2023 13:28:16 GMT -5
Hi George ! I'm afraid I simply cannot swap Instances and keep open edit tabs alive .
A: What you do with "swap Instances" is that if no CAN or END is specified you =X = EXIT the instance creating MRFLIST and restart a new or same Instance in a new Window (ProcessID) . I don't see even a need to terminate the Instance if you don't start restart the same Instance . ( Only Robert wants just one SPFlite active ) . Benefit of keeping Instance active : No reopening all the files just if you want to Switch the Window .
I don't know what you mean with CAN | EDIT . Should it be just CAN | END ?
What is -DO OPENLIST ? Do you have an OPENLIST alias, or Macro?
A: In my txt it is "-DO -OPENLIST" . It should be "-O openlist-filename -D do-macro" .
I think we don't need a restriction on file location . -D do-macro file is in Macros directory . -O openlist-filename file can be anywhere with full path specified . Thanks
|
|
|
Post by George on Oct 11, 2023 14:01:41 GMT -5
MUEH: To pass the open tab list over, I'd have to create the MRF list in the new Instance's version of it, not the current Instance's MRF List. We're getting a bit complicated 'thinking-wise' here. If we pass over the MRF list, and we allow an OPENLIST as well, just how is anyone supposed to track all these files? I've seen your screenshots, and I know you have more tabs open than I can even conceive of managing. And then you throw in an initial DO macro as well. Your mind is obviously way more multi-tasking than mine is.
OK, so you'd like the absence of CAN | END to indicate that the open tabs should be 'carried over' to the new Instance. But does that mean to always SAVE if modified? SAVE based on the AUTOSAVE setting? or no SAVE at all? How about a SAVE operand to indicate the tabs should be SAVEd and transferred over?
George
|
|
|
Post by mueh on Oct 11, 2023 14:37:02 GMT -5
Hi George ! No need to pass over the MRF List . Each instance has its own MRF List in O Table f.e for SPFSrc or HerculesSrc .
You can leave the CAN | END . It will mean that no MRFLIST is created when an INSTANCE is terminated . No SAVE is required because when Instance is ended it aks's for SAVE . Lets continue tomorow since it's getting late . Thanks
|
|
|
Post by George on Oct 11, 2023 15:08:55 GMT -5
MUEH: Ok, tomorrow. But remember if you're running in INSTANCE AAA and are switching to BBB, then the MRF list MUST be created in the BBB Instance. Unless I'm misunderstanding what you want to happen with open edit tabs when the INSTANCE command is issued,
George
|
|
|
Post by Robert on Oct 11, 2023 17:09:05 GMT -5
George, this is now touching on a topic I brought up a little bit ago.
Let's take your example. Let's say I am running Instance AAA and I want to run Instance BBB with an MRF (I am assuming this means, Most Recent Files list, I don't recall this acronym elsewhere) that corresponds to the list of currently open files in AAA.
What I would like to be able to do is:
1. "Do something" to create an "openlist.txt" containing the list of currently open files in a proper OPENLIST format.
2. Issue an INSTANCE command that (a) allows the -DO option (b) so that I could say -DO openlist.txt on that INSTANCE command
So, is this possible? What would constitute the "Do something" in step 1? Would you need to create a command or macro function to "Do something"?
R
|
|
|
Post by mueh on Oct 12, 2023 1:30:10 GMT -5
Hi George ! You sayed : But remember if you're running in INSTANCE AAA and are switching to BBB, then the MRF list MUST be created in the BBB Instance. This is an excetion for first time when no INSTANCE exists and you want to make a CLONE of an instance . Once you have OPENED the required files in INSTANCE BBB an MRFLIST is created on =X or exit of this Instance in the O table . What i want to have is one additional parameter like KEEP ( KEEP runing ) which ignores termination of AAA if specified . In addition following check and error msg should be removed . Just start the INSTANCE and depending on KEEP ignore shutdown of AAA . Here the pictures of the msg's . In case there is check if you do INST AAA in AAA remove it also . This is to restart AAA with maybe an optional -O list . I have proved with cmd's that this checks are not needed . Waiting for a Test Beta . Thanks P.S. I also want hat FM CUT RAW works in Open files . In METHOD FMpCmdCUT(pCmd AS STRING) '- Look for the marked C/CC lines | '-----------------------------------------------------------------------------------------------+ FOR i = 1 TO gFMDCtr ' Lets look at the lines IF gFMD(i).Type(%FEntry, %FFLEntry) THEN ' Only look at real file entries there is no check for %FOpen type . MAKELIST is correctly checking for %FOpen . split '""' p',|' all;c '"' '' .ZL;c '"' (e) .1 will convert CUT RAW data into -OPENLIST format .
|
|
|
Post by George on Oct 12, 2023 9:13:53 GMT -5
OK, what I'm hearing is: - Retain the CAN and END operands and add a KEEP - which will NOT close the existing session. However, if none of these is specified, and there are existing Edit tabs, what's to be done with them? I'd assume KEEP would be a default if none are entered.
- Remove the test for the existence of the new Instance. The restarting SPFLite will perform the normal creation steps
- Creation of an OPENLIST for the open tabs. How about creating this list regardless of any other options and stuffing it in the clipboard. Then adding the option to the CmdLine -O operand of an * instead of a filename to indicate the clipboard contents. If you want to save it, then use CLIP to tweak if needed and then SAVEAS.
Then - is this still a viable INSTANCE command?
INSTANCE -I instance-name -O openlist-filename|* -D do-macro [ CAN | END | KEEP]
MUEH: CUT on the OPEN list has been corrected.
|
|
|
Post by mueh on Oct 12, 2023 9:46:45 GMT -5
Hi George ! No i don't want KEEP as the default . The question is how do you terminate if there are existing edit tabs ? MY suggestion is normal =X command . This cmd will close down SPFLite and save the Active tabs in MRFLIST . Thanks
|
|
|
Post by George on Oct 12, 2023 11:27:49 GMT -5
MUEH: No problem on KEEP not being the default.
Using EXIT to shut down means the MRF list is created in the existing sessions Instance. I thought you wanted the existing tabs to be re-opened in the new Instance. Saving like that doesn't accomplish that, the new session will get whatever MRF that Instance had the last time it ran.
Is that what you want?
George
|
|
|
Post by mueh on Oct 12, 2023 11:46:28 GMT -5
Hi George ! Yes this what i want if no END or CAN is specified . If END or CAN is specified then no MRFLIST should be created . This allows to add additional files with -O . Thanks
|
|
|
Post by mueh on Oct 12, 2023 13:45:35 GMT -5
Hi George! There is another problem with 23283 . If you have SPFLite DEFAULT active and you enter in DOS window to switch to this window SPFLite2.exe -I DEFAULT you get BEEP and in cmd line EDIT "" or "" . No problem in 23278 and earlier versions . Thanks
|
|
|
Post by George on Oct 12, 2023 14:57:32 GMT -5
MUEH: Don't see that. When I do it, it simply pops up the running SPFLite2 window. I'm @ 23285, but there shouldn't be any changes in that area. George
|
|