Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 22, 2019 13:28:37 GMT -5
I get a return code of 8 when I issue "CANCEL" or "END" from the SPF_Cmd function within a MACRO. The doc says that ALL (SPFLite) Primary Commands can be issued using SPF_Cmd. Thanks
|
|
|
Post by George on Jun 23, 2019 11:34:07 GMT -5
Ren: If the Doc says ALL primary commands anywhere, tell me where you saw it and I'll remove it.
No, you can't issue any Primary commands which create/delete/or communicate with other tabs. All the data integrity logic prevents manipulation of one tabs data from another tab.
And the entire macro process runs under a single tabs environment.
Since the execution of thinBasic and the macro also run within a tab, requests like CANCEL and END are impossible. Think about it, if those commands executed, the Tab would close. Where would that leave thinBasic? Who would look after thread cleanup when it terminated etc. etc. No you can't simply reach up the process hierarchy and rip out a higher level, the one that called your level, and magically expect things to continue normally.
Wait for the next release when the SPF_Post_Do function arrives.
George
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 24, 2019 9:46:57 GMT -5
You are correct, it was I that assumed "ALL". The doc says: "the SPFLite primary command you wish executed." (But it does not say do wish for Primary commands which create/delete/or communicate with other tabs). Since I wished to execute "CANCEL", I assumed it would work. A definitive list of Primary Commands which COULD (or could not) be used with the SPF_Cmd would be helpful.
In the: SPF_CMD function and Line Numbers vs. Line Pointers section, the doc says "The SPF_CMD function is used to issue SPFLite primary commands. The command string you pass to the function looks just like one you would type in yourself on the primary command line. There are a few minor differences: ", ..... but again, nothing about "do not use END, CAN, whatever")
In the MACROs for Fun and Profit section, it says: SPF_Cmd("some SPFLite primary command"), but again nothing about not using Primary commands which create/delete/or communicate with other tabs.
I know you guys don't want to mess with the documentation, but in the "REXX to Thin" section, "ISREDIT CANCEL" and "ISREDIT END" and noticeably omitted from the list of ISREDIT functions. Perhaps that would also be a good place to mention that CANCEL and END (and whatever) are not directly supported. But using the POST DO routines, you can replicate these functions: example? (<== Next release).
Looking forward to next release. Thanks.
|
|
|
Post by George on Jun 24, 2019 9:58:57 GMT -5
Rex: Well, maybe I can add something quick to each command description about macro availability. Yeah, quick, 130 times - add row to table, determine Yes/No, paste in text etc. That's quick and I have certainly nothing else to do.
Next release: SPF_Post_Do("!END")
George
|
|
|
Post by George on Jun 25, 2019 15:22:20 GMT -5
Robert: Well, you know me well, I don't have too efficient a muffler. I was known as that at work, my rep was sort of "sure he'll bend over backwards to help you, but be prepared for some grumbling/abuse as well".
My oldest son is exactly the same way, he once said to me "We don't suffer fools too well, do we?"
George
|
|