Components.try
Returns true and the ComponentClass if one was registered with the specified name
Returns true and the ComponentClass if one was registered with the specified name
or false and an error otherwise
ok = Components.try( name, acceptRejected )Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
name |
string | Name of the ComponentClass to check |
acceptRejected |
boolean | Whether to accept names prefixed with the Reject Prefix. |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
ok |
boolean | |
componentClass |
ComponentClass|string | ComponentClass on success, or an error string on failure |
rejected |
string|boolean | On success: the stripped Component name if the name had the Reject Prefix, otherwise false |