Remove all children of a generic object
Overview
Remove all the children of a generic object by using the DestroyAllChildren method.
Example
Prerequisites steps are:
- Create the parent object (a generic object)
- Add a first child to the parent object
- Add a second child to the parent object
- Create a child inside the first child of the parent object
1. Create the parent object. The identifier of the parent object (qId ) is ParentId and the type qType is Parent.
The client sends:
The engine returns:
The parent object is created. Its handle is 2 (qHandle is 2).
2. Add a first child (qId is Child01 and qType is Child) to the parent object. The handle of the request is 2 because the handle of the parent object is 2.
The client sends:
The engine returns:
The child Child01 is created. Its handle is 3.
3. Add a second child (qId is Child02 and qType is Child).
The client sends:
The engine returns:
The child Child02 is created. Its handle is 4.
4. Add a child to the child Child01. The handle of the request is 3 because the handle of the child Child01 is 3. The identifier (qId) of the child is Child0101.
The client sends:
The engine returns:
The child Child0101 is created. Its handle is 5.
5. Get the layout of the parent object. The handle is 2.
The client sends:
The engine returns:
The parent object contains two children: Child01 and Child02.
6. List the children of the child Child01. The handle of the child is 3.
The client sends:
The engine returns:
Child0101 is a child of Child01.
7. Remove all the children of the parent object. The handle of the parent object is 2.
The client sends:
The engine returns:
All the children are removed:
- Child 01 (handle 3)
- Child 02 (handle 4)
- Child0101 (handle 5)
8. Check that the layout of the parent object (handle is 2) is empty.
The client sends:
The engine returns:
The children are no more listed in the layout of the parent object.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!