Consultor Eletrônico



Kbase P17883: Adding a new record by Right-Mouse-Click on a PRG treeview n
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/19/2003
Status: Unverified

FACT(s) (Environment):

Dynamics 2.0A

SYMPTOM(s):

Adding a new record by Right-Mouse-Click on a PRG treeview node

Treeview driven by Extract Program

"No UpdateTarget present for Add Operation"

CAUSE:

Known issue.
This issue is perhaps linked to posse 3099, however, it seems to be specific to the treeview with a PRG node.
Right-Mouse-Click in a treeview on a PRG node shall create a dummy node if
no other subnodes already exists.  The procedure 'nodeAddRecord' in tvcontr.p then will link the dummy node to a folder, a SDO and publishes 'addRecord'.

The problem is the linking to the SDO. Normally ttNode.data_source contains
the handle of the SDO, but for a PRG node this is the handle to the PLIP. Trying to link the SDO to the new node 'nodeAddRecord' executes the dynamic function 'returnSDOName' and without altering the code, this creates errors when the expected reference to the SDO points to the PLIP.

adm2 error message comes: "No UpdateTarget present for Add Operation"

CAUSE:

Bug# 20030131-015

FIX:

Add the following in tvcontr.p
odeAddRecord:

[...]
cSelectedImageFileName = ttNode.selected_image_file_name
NO-ERROR.

DYNAMIC-FUNCTION("setNodeObj":U IN TARGET-PROCEDURE, pdNodeObj).

/* @@@ modif 31/01/03 to solve "No UpdateTarget present for Add Operation"
If PRG node and dummy child created, the objectContainer/Folder must get
reference to SDO, as standard reference in ttNode.data_source points to
PLIP. At this level ttnode.primary_sdo is not used */

IF ttNode.data_source_type EQ "PRG":u THEN DO:
cPrimarySDO = ttnode.primary_sdo.
END.
/* @@@ end modif 31/01/03 @@@ */

IF INDEX(cPrimarySDO,"/":U) = 0 AND
[...]