Progress
ADM 2 Reference
addDataTarget (sbo.p)
Updates the ObjectMapping property. This property is used to broker messages between the contained objects and outside objects in communication with them. It is also used to set DataSourceNames and UpdateTargetNames in the data-targets.
Parameters:INPUT phTarget AS HANDLE
The target handle to be added.
Returns: Nothing (procedure)Notes:
- Called by registerObject, subscribed as DataTargetEvent and published from the DataTarget's initializeObject.
- DataSourceNames might be specified by the user in which case it actually specifies how to generate the ObjectMapping. If it is not set, both it and UpdateTargetNames are always set here so that colValues, addRow, deleteRow, updateRow, etc. can identify the intended target or source without looping through all the fields again and again.
- Objects built against RowObject must find ALL columns in ONE of the ContainedDataObjects in order to become mapped.
- Only this procedure is allowed to add Data-Targets to the ObjectMapping property.
- ObjectMapping versus DataSourceNames. There is some overlap here and add-, copy- and deleteRow with ObjectMapping could be used instead of DataSourceNames. But since both cases require knowing the requester, there is not much advantage to only using the ObjectMapping. A way to distinguish between UpdateTargets and DataSources is necessary, and having them implemented similarly makes it all a bit easier to use.
Ideally, the SBO should not have to know about or deal with the object mapping. That should happen at the visual level instead, so the way mapping works might change in some future release.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |