[comp.databases] Question about ACCELL Language

brwk@doc.ic.ac.uk (Bevis King) (01/24/89)

I have a slight problem with an ACCELL application I am developing.

I wish to suppress (or rather ignore) the messages that are
generated on doing a next rec (down cursor) at the last record
or a prev rec (up cursor) at the first record.  The requirment
to press next form or return, rather than just get a beep
annoys me.

Can anyone suggest a way to do this?

Regards, Bevis

Bevis King, Systems Programmer        |   Email:  brwk@doc.ic.ac.uk
Dept of Computing, Imperial College   |   UUCP :  ..!mcvax!ukc!icdoc!brwk
180 Queens Gate, London, SW7 2BZ, UK. |   Voice:  +44 1 589 5111 x 5085
          "Never argue with a computer" ... Avon (Blake's 7)

scotth@harlie.SGI.COM (Scott Henry) (01/25/89)

From article <583@gould.doc.ic.ac.uk>, by brwk@doc.ic.ac.uk (Bevis King):
> I have a slight problem with an ACCELL application I am developing.
> 
> I wish to suppress (or rather ignore) the messages that are
> generated on doing a next rec (down cursor) at the last record
> or a prev rec (up cursor) at the first record.  The requirment
> to press next form or return, rather than just get a beep
> annoys me.
> 
> Can anyone suggest a way to do this?
> 
> Regards, Bevis

What I have been doing to suppress the messages is actually very simple.
You need to add the following code to your form script (.fs file):

ON NEXT RECORD
   if current_record_num$() >= current_record_count$() then
      reject operation

ON PREVIOUS RECORD
   if current_record_num$() <= 0 then
      reject operation

and bingo! no more beep! The cursor stays on the first/last line no
matter how many times you push the next/prev-record keys!

> Bevis King, Systems Programmer        |   Email:  brwk@doc.ic.ac.uk
> Dept of Computing, Imperial College   |   UUCP :  ..!mcvax!ukc!icdoc!brwk
> 180 Queens Gate, London, SW7 2BZ, UK. |   Voice:  +44 1 589 5111 x 5085
>           "Never argue with a computer" ... Avon (Blake's 7)

scott henry
--
              Scott Henry <scotth@harlie.sgi.com>
#include <std_disclaimer.h>

itkin@mrspoc.UUCP (Steven M. List) (01/30/89)

In article <583@gould.doc.ic.ac.uk> brwk@doc.ic.ac.uk (Bevis King) writes:
> I have a slight problem with an ACCELL application I am developing.
> 
> I wish to suppress (or rather ignore) the messages that are
> generated on doing a next rec (down cursor) at the last record
> or a prev rec (up cursor) at the first record.  The requirment
> to press next form or return, rather than just get a beep
> annoys me.
> 
> Can anyone suggest a way to do this?

ON NEXT RECORD
	if current_record_num$() = current_record_count$() then
	begin
		reject operation
	end

ON PREVIOUS RECORD
	if current_record_num$() = 1 then
	begin
		reject operation
	end

Note that with a little thought and a couple of flags and the use of the
"BEFORE FIELD" section for the first field in the record/form, you can
make your multi-occurrence forms circular (like ACCELL menus).  That is,
you can make NEXT RECORD on the last record go to the first record and vice
versa.
-- 
:  Steven List @ Transact Software, Inc.
:  {apple,coherent,limbo,mips,pyramid,ubvax}!mrspoc!itkin
:  Voice: (415) 961-6112