Consultor Eletrônico



Kbase P17287: How to distinguish a particular SmartDataObject instance at runtime
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   31/05/2005
Status: Unverified

GOAL:

How to distinguish a particular SmartDataObject instance at runtime

FACT(s) (Environment):

Progress 9.1D

FIX:

If there are two or more instances of the same SmartDataObject in an application, there needs to be a way to tell them apart. For example, at design time, the first instance of a SmartDataObject gets named h_SDO and the second would be named h_SDO-2. The following code shows how to tell which object is which:

DYNAMIC-FUNCTION('getObjectname' IN hsdo).

IF DYNAMIC-FUNCTION('getObjectName':U IN hsdo) = "hTest(2)" THEN
MESSAGE "This is the second instance of the SDO" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "This is the first instance" VIEW-AS ALERT-BOX.