Find the value of a ToolType variable.
Source position: icon.pas line 237
function FindToolType( |
const ToolTypeArray: PPChar; |
const TypeName: PChar |
):PChar; |
ToolTypeArray |
|
A Pointer to an array of tool types. |
TypeName |
|
The name of the tooltype entry |
This function searches a tool type array for a given entry, and returns a pointer to that entry. This is useful for finding standard tool type variables. The returned value is not a new copy of the string but is only a pointer to the part of the string after TypeName.
The ToolTypeArray can be get from TDiskObject.do_Tooltypes via GetDiskObject()
Snippet
//Assume the tool type array has two strings in it: // "FILETYPE=text" // "TEMPDIR=:t" FindToolType(toolTypeArray, 'FILETYPE'); // returns 'text' FindToolType(toolTypeArray, 'filetype'); // returns 'text' FindToolType(toolTypeArray, 'TEMPDIR'); // returns ':t' FindToolType(toolTypeArray, 'MAXSIZE'); // returns nil FindToolType(toolTypeArray, 'text'); // returns nil FindToolType(toolTypeArray, ':t'); // returns nil
|
Free all memory in a Workbench disk object. |
|
|
Read in a Workbench disk object from disk. |
|
|
Check a tool type variable for a particular value. |
|
|