. .


ST 4U 259: Inspectors in VA Smalltalk

July 18, 2012 10:33:02.123

Today's Smalltalk 4 You looks at the inspector in VA Smalltalk - a powerful tool for examining objects. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:


If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Today we'll look inspectors in VA Smalltalk. Specifically, the general inspector, and the inspector used for dictionaries. To start with, we'll inspect a couple of simple objects: an array and a dictionary:


Now, select the array, and inspect it. You should see what we have below: the indices of the array on the left (if this were a non-array, those would be instance variables), and the values held in those slots to the right:


Next, inspect the dictionary - it looks much the same, with the keys on the left, and their values on the right:


To see something a bit different for the dictionary inspector, let's evaluate something with a lot more keys: CwConstants.

Large Dictionary

Notice how groups of keys are on the top left (Alphabetically organized, in this case), and, if we select a group, we can see each individual key on the lower left. The values still appear on the right

Now, for dictionaries like this one, we can see a specific addition for the inspector on dictionaries. Right click on a key - notice the menu that pops up? It's different than the one we saw for arrays:

inspector menu

Try browsing references. For the one shown above, you'll see where that key is used in the system:


Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , ,

[st4u259-iPhone.m4v ( Size: 4823167 )]

posted by James Robertson

 Share Tweet This