How To Disable Alt-C In A Window? (AREV Specific)
At 10 JAN 2002 08:49:06PM Jim Dierking wrote:
Just had a case of a customer file overwritten creating a real
nightmare. I didn't see any hook in the key disable in the paint
advanced menu. Any code suggestions? TIA, Jim Dierking
Liberty Natural Products, Inc.
At 10 JAN 2002 09:24PM Victor Engel wrote:
You could use @priority.int.
At 10 JAN 2002 11:21PM Jim Dierking wrote:
Hello Victor, Thanks for the feedback. I must confess my lack of understanding. I am not familiar with @priority.init. How and where
would you apply this? Below I have some code that was used to
disable the Ctrl-D or N on a AMV group. Anyway, I appreciate any
detail you could provide. Thanks, Jim
* Desc: disable ctrl d/n
*
$INSERT INCLUDE,AREV.COMMON
$INSERT INCLUDE,WINDOW.CONSTANTS
IF AMV.ACTION AND CURR.AMV.GROUP=1 THEN
IF INDEX('23',AMV.ACTION,1) THEN AMV.ACTION='END
RETURN
At 11 JAN 2002 02:36AM Victor Engel wrote:
You may with to check http://www.revelation.com/WEBSITE/DISCUSS.NSF/f12696d31000b22a8525652b00831bb2/a192fc6cd94089a085256462004f59d6?OpenDocument&Highlight=0,alt-d for a previous discussion on this topic.
At 11 JAN 2002 02:37AM Victor Engel wrote:
Oops. Here is the top of the thread.
At 11 JAN 2002 04:37AM Jim Dierking wrote:
In this case I am looking to disable the Alt-C record copy command
at the window specific level. The routine I referred to is a hook
off the advanced/process/perpetual process menu. The previous responses have related to the Alt-D function. Where can I found out
the field id and so forth for the alt-c function? Thanks again, Jim
At 11 JAN 2002 04:40AM Donald Bakke wrote:
Jim,
I believe it is available through the Key Disable feature. It's called "Duplicate row".
dbakke@srpcs.com
At 11 JAN 2002 05:01PM Jim Dierking wrote:
Don, I am in AREV 3.1 and I only have a disable key for "DUPLICATE PROMPT" I disabled it, but the Alt-C still will overwrite. I did
notice that when there is an existing record it calls a message asking if you want to overwrite the exiting record Y/N. If there
is a way to get to the code to tell it to exit the routine if there
is a duplicate would be perfect! Anyone out there have any ideas
on this? Jim
At 11 JAN 2002 05:25PM Donald Bakke wrote:
Jim,
Hmmm…I don't recall that "Duplicate Row" was a feature added after 3.1. "Duplicate Prompt" would disable Alt-O, of course. Was not the link that Victor sent you to helpful?
dbakke@srpcs.com
At 11 JAN 2002 06:49PM Victor Engel wrote:
I guess I never replied to you about @priority.int. This variable is a @FM-delimited list of scan codes scanned by INPUT.CHAR. It is usefull in connection with @MACRO.KEYS. @MACRO.KEYS has two fields. The first is a @VM-delimited list of codes. The other is a @VM-delimited list of commands. Unfortunately, the position within @PRIORITY.INT and @MACRO.KEYS does not line up. There is an offset of 8 between the two.
Here is some untested code that you could use as a basis for doing what you need.
SCAN_CODE=Initialize this to the scan code you want to trap. In the case of ALT-C it would be CHAR(3).
LOCATE SCAN_CODE IN @PRIORITY.INT USING @FM SETTING LOCATION THEN
* Now redefine the macro key, if needed
IF LOCATION ] 8 THEN
@MACRO.KEYS=NEW_CODE@MACRO.KEYS=NEW_COMMANDEND
END ELSE
Search string was not found, so LOCATION is not the position following the last data item in @PRIORITY.INT. We will insert the new value at this point.@PRIORITY.INT=SCAN_CODE@MACRO.KEYS=NEW_CODE@MACRO.KEYS=NEW_COMMANDEND
Note that a system reset will erase this assignment. You will also probably want to do the inverse of this when you are finished.