Re: [Developer 2000] Several problems with Form Builder

From: Yann Chevriaux <ychevriaux_at_theleme.com>
Date: Mon, 22 Nov 1999 11:33:36 +0100
Message-ID: <38391C00.2BDC083B_at_theleme.com>


Hi.

1)

    The message FRM-40401 is displayed because no block has been changed or inserted ... You can trap and ignore it into form level ON-MESSAGE trigger because any DML statemement is validated by your commit.

2)
  When you press a button forms navigate to this item. And of course it is not coherent to disable the item having the focus. The best way to solve the problem is to set button properties "navigable" and "mouse navigate" to false.

3)
  This problem is also a focus problem. Whatever you do, focus item, its canvas and its window are always raised ! So, to display "AIDE" you'd better user go_item rather than show_view.

Good luck,

   Yann.

Sydney a écrit :

> Hi
>
> I have some problem with Form Builder.
>
> 1) Here is a PL/SQL to insert a student in the table etudiants.
> Button : Insert Event: WHEN-BUTTON-PRESSED
>
> declare
> nb number(3);
> begin
> select count(*) into nb FROM etudiants WHERE etudiantID =
> :etudiants.etudiantID;
> if nb = 0 then
> insert into etudiants values
> (:etudiants.etudiantID,:etudiants.nom,:etudiants.salarie,
> :etudiants.departement,:etudiants.sexe,
> :etudiants.semestre,:etudiants.annee);
> commit;
> message('Etudiant ajoute');
> else
> message('Etudiant deja existant');
> end if;
> end;
>
> The problem is coming from the commit. The error FRM-40401 appears. The help
> tells nothing to solve this problem.
> The commit is indispensable, if I remove the commit, the data are not
> validated.
> Have you an idea?
>
> 2) Problem with SET-ITEM-PROPERTY
> Button : Modifier Event: WHEN-BUTTON-PRESSED
>
> SET_ITEM_PROPERTY('MODIFIER',ENABLED,PROPERTY_FALSE);
>
> I have an error FRM-41032 which tells me that I can't modify the property
> ENABLED of button Modifier because this button is ACTIVE.
> At the beginning, the button MODIFIER is ENABLED, if I pressed it, it want
> it to become DISABLED.
> How to do this?
>
> 3) Content Canvas - Stack canvas
>
> I have a content canvas called CANVAS32 and a stack canvas called AIDE. On
> the CANVAS32, I have a button HELP with this PL/SQL code.
> begin
> SHOW_VIEW('AIDE');
> end;
> The problem, is that canvas AIDE is not showed at the screen.
> Why?
>
> Thanks a lot for your answer
> Sydney from FRANCE
Received on Mon Nov 22 1999 - 11:33:36 CET

Original text of this message