Skip to content

TResourceTreeNode.CreateResource

Creates a new resource

Declaration

Source position: resourcetree.pp line 59

public 
function TResourceTreeNode.CreateResource : TAbstractResource;  virtual;

Description

This method creates a new resource.

A new resource is created and its type, name and language id are determined from the ancestor nodes in the tree hierarchy.

Usually CreateResource is called by resource readers that read files in which resources are stored as trees.

Remark:

This method is meaningful only when called on leaf nodes (language id nodes).

See also

Name Description
TResourceTreeNode.IsLeaf Reports whether the node is a leaf node.