Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
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
# 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)
Created 27th February 2018, last changed 4th August 2021
Dictionary.Create - Dictionary.Deserialize
Feedback: Report problem or ask question.