Skip to content

DestroyDynamicObject - cWebDynamicObjectContainer

Destroys a dynamic object

Type: Procedure

Parameters

Parameter Type Description
sDynamicObjectId String Object to destroy

Syntax

Procedure DestroyDynamicObject String sDynamicObjectId

Call Example

Send DestroyDynamicObject sDynamicObjectId

Description

Allows for destruction of a dynamic object, which means completely removing it from the container. This includes removal of all its properties and children.

Sample

This sample creates dynamic objects oGroup1 with two children, oForm1 and oForm2. It then destroys oGroup1, which in consequence, destroys its children.

Get CreateDynamicObject of oContainer (RefClass(cWebGroup)) "oGroup1" "" to hoGroup1
Send InitDynamicProp of hoGroup1 "piColumnCount" 8
Get CreateDynamicObject of oContainer (RefClass(cWebForm)) "oForm1" "oGroup1" to hoForm1
Send InitDynamicProp of hoForm1 "piColumnSpan" 8 
Send InitDynamicProp of hoForm1 "psLabel" "My form1"
Get CreateDynamicObject of oContainer (RefClass(cWebForm)) "oForm2" "oGroup2" to hoForm2
Send InitDynamicProp of hoForm2 "piColumnSpan" 8 
Send InitDynamicProp of hoForm2 "psLabel" "My form2"

Send DestroyDynamicObject of oContainer "oGroup1"