Re: Forms 3.0 trigger Q
Date: 7 Jan 1994 06:16:57 -0600
Message-ID: <CJ9Dxz.4yG_at_uk.ac.brookes>
Steve Corbett (p0070623_at_oxford-brookes.ac.uk) wrote:
: Eric Chu (ericc_at_ucsee.EECS.Berkeley.EDU) wrote:
: : I have a question about writing key triggers in Forms 3.0 ..
: : Is there any way I can write the trigger to execute some of my own code
: : and then continue on with its default operation? It seems that for many
: : Key triggers, once it is superceded by a user-defined trigger, there is
: : no real way of duplicating the original function.
: Not that I've found :-(
: Although the only really annoying one is ON-ERROR where you have to
: simulate the error messaging.
What i meant was... there is nothing like do_default_key('key-delrec'), you have to know what the key does and type it in like everyone has kindly suggested. Sorry if i missed the obvious.
: On this subject, anyone found a nice way for the dialogue box 'Do you
: wish to commit the changes - Yes, No, cancel' to run your KEY-COMMIT
: trigger if the user says Yes rather than just doing a commit.
In answer to my own question..
For what it is worth what i do is...
in POST-COMMIT
IF yourflagname = 'Y' THEN
NULL; -- ok user has triggered commit the way i want
ELSE
BELL;
MESSAGE ('ERROR: You must use <COMMIT> to commit ..etcetc');
RAISE FORM_TRGGER_FAILURE;
END IF;
in KEY-COMMIT
do all the stuff i want to do
yourflagname := 'Y';
COMMIT;
more of my stuff...
yourflagname := 'N';
I have 'myflagname' in a block initialised to null.
I don't consider this to be 'nice', but it doesn't get to be too verbose a solution.
-- Steve Corbett. vvv [. .] p0070623_at_brookes.ac.uk --------o00-(_)-00o---------Received on Fri Jan 07 1994 - 13:16:57 CET