Today's Smalltalk 4 You looks at generating accessors with the VA Smalltalk toolset. 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:
You can also watch it on YouTube:
Today we'll take a look at something you need to do all the time in Smalltalk - generate accessor methods. In VA Smalltalk, you'll want to switch to the Trailblazer browsers to do that (see this tutorial for more on that). To start with, select your class in the browser, and then pop up the context menu - pick Show>>Instance Variables:
Next, select one of the variables, and use the context menu again:
For each one selected, you'll get prompted for the name of the argument for the setter method:
And that's it - you now have accessing methods:
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.
[st4u191-iPhone.m4v ( Size: 3426227 )]