Sign in Join
FPDoc Onlineexperiment

TAbstractResource.ChangeDescTypeAllowed function

Member of TAbstractResourceprotectedIn unit resource

Reports whether changing the type of resource type or name is allowed

Declaration

pascal
function ChangeDescTypeAllowed(aDesc: TResourceDesc): Boolean; virtual
 ; abstract

Arguments

aDesc

The TResourceDesc whose type should be changed

Function result

True if the resource allows the given TResourceDesc to change type

Description

Descendant classes must implement this method to declare if the resource allows changing the type of one of its resource description (type or name): that is, if it allows one of its descriptions type to change from dtName to dtID or vice versa.

Example:

A certain resource class allows its name only to be changed: e.g. a TBitmapResource doesn't want its type to be anything else than RT_BITMAP. It then allows changing the type of the description only if the description is the resource name:

Result:=aDesc=fName;

See also

  • ChangDescValueAllowed

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.