[Overview][Resource strings][Constants][Types][Classes][Index] |
Adds a resource and gives it a new autogenerated name
Source position: resource.pp line 249
public function TResources.AddAutoID( |
aResource: TAbstractResource |
):TResID; |
aResource |
|
The resource to add |
The autogenerated ID of the added resource
This method tries to find a spare ID to use as a name for the given resource, assigns it to the resource, and adds it.
This method is useful when the name of the resource is not important. E.g. a group resource doesn't care about the names of its sub-resources, so it could use this method to ensure that its sub-resources don't clash with names of other sub-resources of the same type.
If there are no more free IDs for the resource type of the given resource (that is, when the number of resources of the same type of aResource with an ID name is equal to 65536) an ENoMoreFreeIDsException exception is raised.
|
Adds a resource |