. .

st4u

ST 4U 260: Inspectors in VA Smalltalk, part 2

July 20, 2012 9:38:11.173

Today's Smalltalk 4 You goes deeper into the VA Smalltalk inspector. 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:

Inspector.

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 continue with inspectors in VA Smalltalk. One thing to bear in mind is that you are inspecting the live object - try inspecting the code below:


1 to: 100 by: 20.

You should see an inspector on the Interval object. The instance variables are on the left, with the values on the right. For self, we see a printable representation of the entire object:

interval

Now, on the left, select by, and change the value to something else - like 11. Pop up the menu in the right pane, and select save:

inspector

See what happened? By changing the value of one of the attributes, we changed the object:

inspector

You can do that for any object in the system, but be careful - if you were to inspect something like CwConstants, which is used across the system, and make changes, you could damage the way things operate. With Smalltalk, you have a lot of power, but you need to be careful about how you wield it.

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: , ,

Enclosures:
[st4u260-iPhone.m4v ( Size: 3752895 )]

posted by James Robertson

 Share Tweet This