Release 10.1A: OpenEdge Development:
ADM Reference

> ## modifyListProperty

> Procedure that allows values to be added to or deleted from any object property that is a comma-separated list.

> Location: smart.p

> 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.

> Notes:

> - This is the ADM 2 equivalent of what was`modify–list–attribute` in the Version 8 ADM.

> - Normally the first argument is 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 `get` `propname` 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 `set` `propname` function is run to reset the value of the list property. Both the `get` and `set` functions must exist; otherwise, modifyListProperty returns 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 `set` `propname` function resets the entire list to the value, which is normally not what is desired.

> Examples:

>     /* This code will add an additional entry to the SupportedLinks property
>        for the object.*/
>     RUN modifyListProperty (INPUT THIS-PROCEDURE, INPUT ‘ADD’:U, INPUT
>        ‘SupportedLinks’:U, INPUT ‘SpecialLink’:U).
>     /* This code adds the specified source procedure handle to the list of
>        "Source"s for the specified link in the specifed Target procedure
>         handle (from addLink). */
>     RUN modifyListProperty (INPUT phTarget, INPUT ‘ADD’:U, INPUT
>       pcLink + "Source":U, INPUT STRING(phSource)).

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095