Today's Smalltalk 4 You looks at change recovery in Pharo under the worst circumstances - what if your working image won't start?. 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 simple socket communications, using VA Smalltalk and VisualWorks Smalltalk to set up an example. 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 at using sockets for basic communication in VA Smalltalk. In order to get something real, we'll set up a socket server in VisualWorks, and have VA Smalltalk interact with that. To get started, load the TCP support into VA:
That loads in the basic support we need. We'll be running two bits of code - the first bit below is in VW, the second, in VA:
"In VisualWorks"
SocketAccessor exampleIPServer.
"get port number from VW Transcript, then run this"
socket := AbtSocketStream openAsClientToHost: 'localhost' port: 49174.
socket nextPutAll: 'hello'.
socket cr.
socket flush.
ans := socket upToEnd.
Transcript show: 'From VW: ', ans; cr.
socket close.
Over in VisualWorks, that sets up a simple server that waits for a string terminated by a CR. We dutifully send that from VA, and then get back a similar string from VW. On both ends, we print the results to the Transcript:
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 using a mapping specification (in XML) so that the XML parser in VA will return Smalltalk objects rather than an XML document object. 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 at setting up a mapping of XML to Smalltalk objects via a mapping file. We'll still be using the same orders example we've been looking at; this time, we have the additional mapping file:
To run this example, use:
AbtXmlBasicSamples mappedExample
and that code looks like this:
| mappingDOM mappingSpec result |
self isDataInFile ifFalse: [self setupData].
self isMapInFile ifFalse: [self setupMap].
" Create a mapping spec from the order map "
mappingDOM := AbtXmlDOMParser newNonValidatingParser
parseURI: 'order.map'. "The image must contain Smalltalk classes conforming to the map."
mappingSpec := AbtXmlMappingSpec fromMappingDOM: mappingDOM.
" Parse the data "
result := AbtXmlMappingParser newValidatingParser
mappingSpec: mappingSpec;
parseURI: 'order.xml'.
^result abtXmlMappedObject.
What that does is read the mapping data first, to construct a specification - that will be used when parsing the XML in order to get objects instead of a basic DOM object. The results should look like this:
If you take a look at the mapping XML file, you'll see that it's pretty easy to understand - setting one up yourself would not be a problem.
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 a few debug/information tips for Pharo, culled from Mariano's site. 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 standard development process using VA Smalltalk and ENVY. 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 at using a DTD in conjunction with an XML document - to get started, you'll want to load the XML Support and XML Examples. Once you've done that, you can have a look at class AbtXmlBasicExample class, and method #saxExample. You'll also see that there are other examples - you should probably have a look at all of them. Try executing the example code
To run this example, use:
AbtXmlBasicSamples maplessExample
That will drop the XML file that's used first, and then execute the XML handling. The results come back this way:
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 standard development process using VA Smalltalk and ENVY. 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 at a SAX content handler example - to get started, you'll want to load the XML Support and XML Examples. Once you've done that, you can have a look at class AbtXmlBasicExample class, and method #saxExample. You'll also see that there are other examples - you should probably have a look at all of them. Try executing the example code
AbtXmlBasicSamples saxExample
That will drop the XML file that's used first, which you can see below. It then hooks up the component parts (as explained in the last screencast) to parse the file and get a set of objects back:
To see how that all works, take a look at class JrcOrderContentHandler. This class handles the different XML nodes in the file, and creates the appropriate types of objects as they are encountered. If you look at the customized methods (overrides of the placeholders in the superclass), you can see that it's all done via:
Creating the proper instance of an object based on the node
Managing the current "filling" of instance variables via a stack
Catching the end of the current node to close the current object out and pop it off the stack
You'l also need a class for each kind of object (unless you plan on creating a simple Collection/Dictionary setup, which would be easy enough to do in your handler). Here's one of those classes:
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 standard development process using VA Smalltalk and ENVY. 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 start looking at SAX driver support in the VA Smalltalk XML codebase. What you'll want to take a look at (after loading the basic XML Support) is the class AbtXmlSaxDefaultHandler. When you create your own sax handler, you'll be subclassing this class:
Take a look at the methods in the category Abt-ContentHandler category - these are the ones you'll be specializing. We'll take a look at a specific example in the next screencast.
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 starts looking into the XML support 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:
Today we'll start looking at the XML support in VA Smalltalk - what to load, and how to get started with it. In the Features list, you'll want to load two things:
XML Support
XML Examples
As a starting point, let's look at the base XML parser - we're going to read in a large XML file (something produced by BottomFeeder).
To get an XML Document, you just need to execute the following (note that we aren't using validation; if you have a schema, you can provide that and turn validation on):
The argument can be either a file path or URI. You should see something like this if you inspect that:
That's about it for today - we'll start doing some more involved work with XML over the next few screencasts.
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 settings code in Pharo - specifically, how do you figure out what the code behind a setting is if you need that?. 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 feature of the Finder in Pharo - if you know what a method does, but can't come up with the name, you still have some options. 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.