Today's Smalltalk 4 You looks at using VisualWorks.ini to make it easier to launch any version of VisualWorks via the same image file association (Windows). 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.
Today's Smalltalk 4 You looks at the Swapper framework in VA, which can be used to save and restore arbitrary objects to disk in a binary format. 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 take a look at how you can easily store objects in a binary format in external files. VA provides the Swapper framework for this, and it's pretty easy to use. Our example uses a simple point, but you can use theSwapper to store arbitrary objects to a file:
Note the you don't really check for exceptions; that's all done inside the framework. Rather, you check for errors after your code executes. Once you've got the objects on disk, you'll eventually want them back in Smalltalk:
Execute that, and you should see your Point object:
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.
Today's Smalltalk 4 You looks at two collection classes, Bag and Set. 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:
Two of the Collection classes that you might need to know more about are Set and bag. The best way to look at that is via a small example:
What a Bag does is tell you the count for each unique element in the collection. That can be useful if you don't care about the order, but are interested in the occurrences - like this:
Sets give you just the unique elements - useful if you want to filter out duplicates.
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.
Today's Smalltalk 4 You looks at change in the way Subcanvases work in newer revs of VisualWorks, and something you may have to do if you rely on some of the older APIs. 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.
Today's Smalltalk 4 You looks at a recent VisualWorks change in binary messages that might impact your upgrade. 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.
Today's Smalltalk 4 You looks at an interesting issue with teh Atomic analyzer and loader in VW. 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.
Today's Smalltalk 4 You starts looking at the basic memory monitoring tools available in VA Smalltalk. 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:
It can be useful to get an idea as to how memory is being used as parts of your Smalltalk application are running - VA Smalltalk provides some tools that allow you to have that look. First off, you'll need to load some applications using the ApplicationManager (EsMemoryTools)
Once that's loaded, go to the launcher's tools menu, and start the monitor:
If you start it, not a lot will be happening - after all, we aren't really running anything but the base image. Try something - here, we loaded an image file using streams:
See the changes? You can use this to better effect when running your application (or hotspots in it) to see what's going on.
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.
Today's Smalltalk 4 You looks at loading applications into ObjectStudio. The way things end up being displayed for use (and where the Transcript is located) differs somewhat from VisualWorks and VA Smalltalk.. 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.
Today's Smalltalk 4 You looks at constructed messages - sometimes useful in Smalltalk, but not without their risks. 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:
One of the things you run across in Smalltalk early on - and typically think is very cool at the time - is the ability to construct and perform a message send. You can ask an object to execute a message via the symbol for the name:
someObject perform: #nameOfMethodHere
That kind of thing is common, and used quite frequently - for instance, eecuting a message after an item has been selected from a list of options. If the actual symbol is used, it's even traceable by the tools in the system. What's also possible - but much harder to trace - is something like this:
Here, a message is constructed by string concatenation, with the string then being made into a symbol and performed. The problem? It's impossible to find these references with the tools - you have to know where they are. Worse yet, we've seen such usage combined with the last screencast - wrap this in an MNU handler, and you'll never know what it isn't working.
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.
Today's Smalltalk 4 You looks at the a cool - but dangerous - thing in Smalltalk - the ability to handle messages that are not understood. 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:
One of the things you'll run across in Smalltalk is the ability to handle a "Message Not Understood" exception. While there are uses for such handling (proxy development, for example) - it's often quite dangerous. Even more dangerous is implementing a catchall #doesNotUnderstand: message to your class - it can simply swallow all such MNU exceptions, leading to very bizarre behavior. Consider a simple Counter class with a one up counter, and an #addOne (but no #subtractOne) method, and this implementation:
It seems simple enough, but consider the case where that counter is meaningful. A user of the class might think #subtractOne works, and then end up with unexpected values. It can be more serious in a real application - recently, I've been upgrading a VisualWorks 7.6 application to VisualWorks 7.9.1. One of the parts swallowed exceptions like what we have above, and finding the missing methods became very difficult.
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.