Dynamic Variables
Simple extension for adding dynamic variables! You can rename, get values, delete and more!
P.S. I am just having fun making this extension. You can totally achieve these by dictionary lol
Blocks
Blocks | Description | ||||||
---|---|---|---|---|---|---|---|
Raises when any error occured.
|
|||||||
Initialize a variable.
|
|||||||
Initialize list of variables. Both list mustn't be empty. "names" and "values" must a list, and their length must be the same.
|
|||||||
Returns: Any Get the value of a variable. If the variable doesn't exist, return null.
|
|||||||
Returns: List Get a list of values. The input should be a list of variable's names. If any of the variables doesn't exist, that item will be null. If the input list is empty, or any errors occurred, return an empty list.
|
|||||||
Returns: List Get variables' names by its value. Return an empty list if there are no variables, or when error occured.
|
|||||||
Returns: List Get all of the variable names. Return an empty list if there are no variables, or when error occured. |
|||||||
Returns: List Get all of the values. Return an empty list if there are no variables, or when error occurred. |
|||||||
Rename a variable. If the old variable doesn't exist, error will occur.
|
|||||||
Rename a list of varibles. All list must not be empty. Length of both list must be the same. If any one of the old names doesn't exist, error will occur.
|
|||||||
Returns: Any Remove a variable and return removed value. If the variable doesn't exist, return null.
|
|||||||
Returns: List Remove list of variables and return a list of removed values. If any of variable's name doesn't exist, that item of the list will be null.
|
|||||||
Remove all variables. | |||||||
Returns: Boolean Check if given variable name exists. Return true if variable exists, otherwise false. Return false if an error occurred.
|
|||||||
Returns: Boolean Check if given value exists. Return true if value exists, otherwise false. Return false if an error occurred.
|
|||||||
Returns: Number (int) Return the number of variables. Return -1 if an error occurred. |
|||||||
Returns: Boolean Check if any variables exist. Return true if no variable exists, otherwise false. Return false if an error occurred. |
Change Log
Version 2 (1.1)
- Removed method code and error code; they are useless
- Changed
NumOfVariables
toSize
- Changed
IsVariableExist
toNameExist
- Added
ValueExist
- Added
GetNameByValue
- Some methods return
"null"
instead of"not found"
Download
For more details see here Kodular Community