Release 10.1A: OpenEdge Development:
ADM Reference

> ## removeLink

> Procedure that removes a specific link between two objects.

> Location: smart.p

> Parameters:

> `INPUT phSource AS HANDLE`

> Source procedure handle.

> `INPUT pcLink AS CHARACTER`

> Link type name.

> `INPUT phTarget AS HANDLE`

> Link target object handle.

> Notes:

> - This procedure both removes the handles of both Source and Target from the appropriate SmartObject properties (see addLink) and also does an UNSUBSCRIBE for each named event associated with the link.

> - All SmartObject links are removed when an object is destroyed. This procedure could be used in application code to remove a specific link based on application requirements.

> Examples:

>     /* This example removed the Update link between a visual SmartObject such
>        as a SmartDataViewer and its associated SmartDataObject, perhaps in
>        response to an application event or security check which should make
>        the SmartDataObject non-updatable. */
>     hTarget = WIDGET-HANDLE(dynamic-function(‘linkHandles’, INPUT
>        ‘Update-Target’:U)).
>     IF VALID-HANDLE(hTarget) THEN
>        RUN removeLink(THIS-PROCEDURE, ‘Update’:U, hTarget).

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