Release 10.1A: OpenEdge Development:
AppBuilder

> ## Add/remove SmartLinks (adeuib/_ablink.p)

> Use the `adeuib/_ablink.p` procedure to add/remove a SmartLink joining two SmartObjects:

> Calling sequence
>     RUN adeuib/_ablink.p.p
>       ( INPUT  pc_operation ,
>         INPUT  pi_sourcecontext ,
>         INPUT  pc_linkname ,
>         INPUT  pi_targetcontext ,
>       ) .

> ##### Input parameters

> The `adeuib/_accsect.p` procedure takes the following input parameters:

> ``pc_operation``

> A quoted character string that specifies the operation to be performed:

> - `“ADD”` - Adds the link identified by the `pc_linkname` parameter.
> - `“REMOVE”` - Removes the link identified by the `pc_linkname` parameter.
> ``pc_sourcecontext``

> The context ID for the object at the originating (source) end of the link.

> If the operation is “`REMOVE`”, you can use the question mark (`?`) character to refer to `THIS-PROCEDURE`.

> If the operation is “`REMOVE`” and the target context argument represents a single destination object, you can use:

> - The context ID for a single source object.
> - A comma-separated list of context IDs, representing multiple source objects.
> - The star (`*`) character, representing all source objects.
> ``pc_linkname``

> A quoted character string identifying the type of link to be added (`ADD`) or removed (`REMOVE`). For example “`FILTER`”

> ``pc_targetcontext``

> The context ID for the object at the destination (target) end of the link.

> If the operation is “`REMOVE`”, use the question mark (`?`) to refer to `THIS-PROCEDURE`.

> If the operation is “`REMOVE`” and the source context argument is a single object, use:

> - The context ID for a single destination object.
> - A comma-separated list of context IDs, representing multiple destination objects.
> - The star (*) character, representing all destination objects.
> Note: Either the source context or the target context must represent a single object. You cannot have multiple objects at both the source and target ends. If the operation is `“ADD”`, both source and target must be single objects.

> ##### Example

> The following code purges all `Navigation` links originating at the caller:

>     /*
>     ** Get own context ID. Example presumes handle of
>     ** current procedure previously stored in phSelf
>     */

>     RUN adeuib/_uibinfo.p
>         ( INPUT ?,
>           INPUT "HANDLE " + STRING( phSelf ),
>           INPUT "CONTEXT":U,
>           OUTPUT cContextID
>         ).

>     /*
>     ** Remove all Nav links
>     */

>     RUN adeuib/_ablink.p
>         ( INPUT "REMOVE":U,
>           INPUT cContextID,
>           INPUT "NAVIGATION":U,
>           INPUT "*":U
>         ).

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