Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Creates a new dictionary with desired key.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Dictionary | 8.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
KeyRef | The desired key reference. | "IDs" | |
Key... | Optional, a key. | Optional | |
Value... | Optional, a value. | Optional |
Returns dictionary reference or error.
Creates new dictionary with reference number "IDs":
MBS("Dictionary.CreateNamed"; "IDs")
Create dictionary, add a function and call it:
# create environment
Set Variable [ $CF ; Value: MBS("Dictionary.CreateNamed"; "test" ) ]
#
# Register one function. Replacing older one with same name
Set Variable [ $FunctionName ; Value: "Greet" ]
Set Variable [ $Body ; Value: "/// Name¶¶\"Welcome \" & Name & \"!\"" ]
Set Variable [ $r ; Value: MBS( "Dictionary.SetValueForKey"; "test"; $FunctionName; $Body) ]
#
# now run it
Set Variable [ $r ; Value: MBS("FM.CF"; "test"; "Greet"; "Peter") ]
Show Custom Dialog [ "Result" ; $r ]
#
# cleanup
Set Variable [ $r ; Value: MBS("Dictionary.Release"; "test") ]
Build a dictionary with given Keys and Values:
MBS("Dictionary.CreateNamed"; "MyName"; "FirstName"; $FirstName; "LastName"; $LastName; "City"; $City; "Phone"; $Phone; "Email"; $Email)
This function checks for a license.
Created 27th February 2018, last changed 16th December 2023