Progress
ADM 2 Reference
modifyListProperty (smart.p)
Allows values to be added to or deleted from any object property that is a comma-separated list.
Parameters:INPUT phCaller AS HANDLE
Handle of the object whose property is being changed.
INPUT pcMode AS CHARACTER
"
ADD"
or"
REMOVE"
.INPUT pcListName AS CHARACTER
The name of the property.
INPUT pcListvalue AS CHARACTER
The value to add or remove.
Returns: Nothing (procedure)Notes:
- This is the ADM 2 equivalent of what was modify–list–attribute in the Version 8 ADM.
- Normally the first argument will be the handle THIS–PROCEDURE, if the property value is to be changed for the current SmartObject. However, this can be another procedure handle if the property is to be modified in another object.
- The modifyListProperty procedure first runs the getpropname function to retrieve the current value of the property. If a new value is being added, and is already contained in the list, or if a value to be removed is not present in the list, modifyListProperty simply returns without error. Otherwise, the change to the list is made and the setpropname function is run to reset the value of the list property. Both the get and set functions must exist; otherwise, modifyListProperty will return without error.
- There are many ADM Properties that are expressed as comma-separated lists of handles or other values. All of these should be maintained using the modifyListProperty procedure. Using the setpropname function will reset the entire list to the value, which is normally not what is desired.
Examples:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |