Issue 30855  —   Mouse click: Predisplay trigger returns wrong value for $entname, $fieldname

Status:   Solved in 10.2.01

Solution available in patch(es):      X705    G101

Description:

 Summary:
 A mouse click is not enough to make current $entname and $fieldname
 available in the Predisplay triggers from a menu (menu item,
 Drop-down menu, a dynamic menu).
 $entname , $fieldname are out of sync until a keyboard
 action or selecting an option from the menu occurs.

 Environment:
 + Uniface: Uniface Eight and Nine
 + Operating System: OS independent
 + Database: DBMS independent

 Symptoms:

 A mouse click is not enough to make current $entname and $fieldname
 available in the Predisplay triggers from a menu (menu item,
 Drop-down menu, a dynamic menu).
 $entname , $fieldname are out of sync until a keyboard
 action or selecting an option from the menu occurs.

 To reproduce:
 ------------
 1. Create:
  - Form B30855 with 2 entities (OUTR=outer entity,
    INR=inner entity as multi-occurrence).
  - MENBAR in library USYS is defined as Menu Bar in the
    form properties from MEN_TST
  - MENBAR has as items Drop-down menus Problem , Workaround and
    Problem not dynamic
   Drop-down menu Problem    references dynamic menu F1 in library USYS
   Drop-down menu Workaround references dynamic menu ED in library USYS
   Drop-down menu Problem not dynamic  references Drop-down menu F2
   with Option I1 in library USYS

 2. Start the form
 3. Click in a field
 4. Click a menu type in a field,
 5. Click in another field
 6. Click a menu
 7. Select option from the menu ....

 Result:
    $entname and $fieldname are out of sync until a
    keyboard action or selecting an option from
    the menu occurs.

 Expected:
    $entname and $fieldname should be in sync already
    after the mouse event in step 7.

 Uniface Proc used:
 -----------------

 Predisplay trigger F1

 variables
    string strMenuItem
 endvariables

 ; ----------- Insert first menu item in a dynamic menu --------------

 ;Initialize one menu item in list
   StrMenuItem = ""

 ;Define menu item "Option A"
   putitem/id strMenuItem, "TYPE", "Option"
   putitem/id strMenuItem, "TEXT", "Option %A fieldname %%$fieldname"
   putitem/id strMenuItem, "Checked", "True"

 ;Insert this item with id "a" into the dynamic menu.
   putitem/id $inlinemenu, "A", strMenuItem

 ;Define menu item "Option B"
   putitem/id strMenuItem, "TYPE", "Option"
   putitem/id strMenuItem, "TEXT", "Option %B entname %%$entname"
   putitem/id strMenuItem, "Checked", "True"

 ;Insert this item with id "b" into the dynamic menu.
   putitem/id $inlinemenu, "B", strMenuItem

 putmess "predisplay MENBAR-File-F1 fired at %%$datim"

 Predisplay trigger ED is the same both now using $ename$ and
 $fname$ in stead of $entname and $fieldname.
 These local variables are set in focus triggers from the
 fields and entities on the component.

 Predisplay trigger menu item I1 from Drop-down menu F2
 putmess "predis F2 item I1 %%$fieldname entity %%$entname"

Workaround:

 There is no known workaround for this problem.

Notes: