Adding and removing dictionary keys
A Dictionary Inspector supports menu options in addition to those offered in other Inspector windows. Using the menu options Add Key or Remove Key you can change the number of keys in the dictionary.
Adding Keys
For example, from an inspector open on the dictionary that you just created, you can add a new key as follows:
1. Select Add Key from the Variables menu.
2. In the displayed prompter, type #name3; then select OK.
The key is added to the dictionary with a value nil. Replace the value nil with a string such as 'Steven', and then save the change.
Menu for Dictionary Inspector
Now, when you evaluate self inspect in the value pane, the string 'Steven' appears as an object in the dictionary.
Removing Keys
To remove the string 'Steven' from the dictionary:
1. With the key #name3 highlighted, select Remove Key from the Variables menu.
2. In the displayed prompter, select Yes to confirm the removal.
The value for self displayed immediately after removing a key shows that the string 'Steven' is no longer in the dictionary.
Last modified date: 03/13/2019