"invalid" hook in Paint when prompt data Validation fails (AREV32)
At 28 JAN 2023 10:07:31PM Robert Heard wrote:
Hello AREV32 fans,
Not been able to find much on how to prompt user for a message and if they indicate 'Y', to change the data they entered. I had assumed this was done at the "Invalid" hook in Paint. I can see that the data that was entered at the (multivalue prompt) is in @ANS. But if I change the contents, I cannot get it to be changed at the Window prompt. I'm using REDISPLAY.LIST=WI (for the current prompt number); DISPLAY.ACTION=6 (display the specified prompt(s) - in this case, just the current prompt); RESET=?? (I've tried all values from 1 to 5).
Cannot get it to "stuff" the new value of @ANS into the list. Also note that MV nor @MV seem to reflect the current multivalue location in IS. But can get this by a simple COUNT(IS,@VM).
Perhaps the "Invalid" hook is the wrong one for my needs? Will have a look at Post-Prompt… Have since put MSG() call on Post-Prompt and can see this is well after "the horse has bolted", and left that prompt.
I would like to keep the standard error message when data entered has failed the validation test, but then want to begin the "failure" processing. How to do this and "stuff in" the revised data at this MV location at this prompt?
The documented info on AREV.COMMON and WINDOW_COMMON% is "thin" to say the least.
Any help much appreciated.
Are there some other documents somewhere that I have not discovered that cover the various hooks in Paint for a prompt? I have the manuals for AREV 3.0. Only brief descriptions for Pre-Prompt and Post-Prompt processing, nothing else mentioned.
Robert
At 30 JAN 2023 07:19AM Andrew McAuley wrote:
I'm unsure if you know of an old publication called REVMEDIA? It documents WC_COMMON% quite extensively with articles like this?
World leaders in all things RevSoft
At 30 JAN 2023 08:06PM Robert Heard wrote:
Hello Andrew,
I'm not sure of that name (although I think it is a great name), I do recall a printed bulletin from the late 1980's, when I was first introduced to AREV when working at the Public Works Department in Sydney Australia. Wish I had kept those bulletins.
Thanks for the info on positioning on a particular row of an AMV. I am not using an AMV in my case, but I will browse the other issues in the REVMEDIA catalog.
BTW, found some confusing syntax on Volume 1, Issue 2, Item 2, regarding use of XLATE(. Lookins like that (') before @ID should be a comma (,), and appears to be a "dangling" (') at the end. Any chance you have access to this catalog and could edit?
Speaking of editing, I love doing it. If you'd like, I can browse through the Volumes and look for errors.
Regards,
Robert
At 31 JAN 2023 04:58AM Andrew McAuley wrote:
Thank you for the offer. The content was hand-typed by a junior back when digitisation was still in its infancy so there are lots of mistakes. I'll see if I can make those changes - can't think why not ;). Been decades since we last looked at it. Public Works were a subscriber I recall but there were other good sources of info too.
World leaders in all things RevSoft
At 02 FEB 2023 07:24PM Robert Heard wrote:
I found the solution:
Rather than using a pattern match on the "Validation" hook, I do a Catalyst call to run a tiny program in the Window's Register4, with "@C <R4>@". You could also call a subroutine here using "@S prog_name@", but then it would also need to be catalogued.
The tiny program simply checks that @ANS matches the normal pattern of record keys (98% of records), and if not, to display a message (call to MSG() with 'R' option to get a reply), and if they answered 'Y', then to modify @ANS accordingly. If 'N', no change is made to @ANS. Then I set STATUS()=0 to indicate that the data entered was valid. The modified data is correctly updated at the prompt in the window.
This makes it dead easy, and you don't need to be concerned about where you are in the list of multivalued prompt.
Cheers,
Robert Heard
Brisbane Australia
At 06 FEB 2023 09:48PM Robert Heard wrote:
Hello Andrew,
Have been browsing through the Volumes of old AREV articles.
Found a reference to "@SCROLL.MODE", but when read the article, it says something like "no longer used".
What was it's initial intent? What was meant to be the replacement function?
Robert.
At 07 FEB 2023 04:51AM Andrew McAuley wrote:
Hello Andrew,
Have been browsing through the Volumes of old AREV articles.
Found a reference to "@SCROLL.MODE", but when read the article, it says something like "no longer used".
What was it's initial intent? What was meant to be the replacement function?
Robert.
The way we would work back then was to work out the opcodes associated with a specific @Variable and scan object code for its use. If we didn't find the opcode we assumed the @Variable was deprecated. When they moved from AREV to OI not all of the SYSCOM made it and @SCROLL.MODE was one such casualty.
But as we were doccing it as unused back then I imagine it was a carry over from Rev G.
World leaders in all things RevSoft