Re: Synchronize & Forms 4.5

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 26 Apr 1999 16:24:06 GMT
Message-ID: <7g23v6$2cl$1_at_nntp.csufresno.edu>


In article <37236EC7.AE855E97_at_ghoti.clara.co.uk>, Jon Martin <jon_at_ghoti.clara.co.uk> wrote:
>I have converted a SQL*Forms application into Forms 4.5, and found the
>following problem which I cannot resolve.
>
>I have a called form with a WHEN_NEW_FORM_INSTANCE trigger like below:
>
>pr_get_first_record; -- procedure to get first record
>synchronize;
>pr_get_second_record;
>synchronize;
>pr_get_third_record;
>synchronize;
>... etc, until
>pr_get_last_record;
>first_record;

That's some strange code. You do not need to use synchronize except in some rare instances. All Synchronize does is re-display the screen between steps, instead of waiting until all pl/sql processing has finished. The only useful place I have found to use synchronize is to force a "working" message to display on the status line, and to force the cursor shape to change to the hourglass.

If the First_Record command is not doing what you expect, then you probably have a when-new-item-instance or when-new-record-instance trigger that is running after the First_Record command executes.

Steve Cosner

>Almost without fail, the 'first_record' always puts the cursor at the
>second record. If I change it to a 'last_record', the cursor ends up at
>a new record (i.e. below the last record).
>
>The only way I can get the cursor to the first record is by interrupting
>the logic with an alert. It seems that moving the focus to a new window
>and back again sorts things out.
>
>Has anyone any ideas, as I don't like to put a pointless alert in the
>code, as users will not be over impressed?
Received on Mon Apr 26 1999 - 18:24:06 CEST

Original text of this message