|
Post by Stefan on Oct 25, 2022 11:18:34 GMT -5
George,
I have a question about primary commands that are not allowed to be called from a macro.
I'm throwing some code around for Robert's BACKVIEW idea.
One question is - are there any backups for the file being edited?
Well, I could go into the folder and count them, or I could just issue SPF_CMD("BACKUP ?") and look at Get_Msg$.
Except that BACKUP isn't allowed in a macro. There's some other commands that are similarly afflicted (some are in the Profile bug list which you're looking at separately). I think in general, it would be good if the "command ?" syntax were allowed from within a macro. It is afterall merely a query request and does not invoke the command's actual processing.
How hard this is, or if it is even possible will depend on where the decision to barr access is taken.
If it is all handled outwith the command's code, it may be tricky to allow the ? operand through and block the rest. Only you can tell.
|
|
|
Post by George on Oct 25, 2022 12:53:59 GMT -5
OK, macros can now call ANY "cmd-name ?" command or Get_Profile$(cmd-name-type). Just a minor change.
If we support BACKUP for special sessions, my preference is they all go to the HomeFolder or DataFolder (forget now which is which).
George
|
|
|
Post by George on Oct 25, 2022 13:07:56 GMT -5
Further, it's more involved than I remember since BACKUP is designed to COPY the currently saved disk version of the file.
For SET, CLIP and EFT there IS NO FILE. Meaning no existing code is re-usable.
George
|
|
|
Post by Stefan on Oct 25, 2022 13:12:14 GMT -5
R.
It's ok. I was looking to use the BACKUP ? command because it provides the answer to two questions needed for BACKVIEW a) is there a backup b) if so, how many versions are there?
No drama. I've coded it so that I go to the folder and read the file list to determine the answer to both. Just wanted to avoid going off to the file system unnecessarily via 'interpreted BASIC' when BACKUP does it in a 'compiled' way. But I need to do it anyway of there are backups, so, no drama.
|
|
|
Post by George on Oct 25, 2022 13:19:01 GMT -5
Robert: That's true, but it certainly messes up all the code with code fork branches and exceptions here and there. Just more cruddy code hacking.
George
|
|