Today's Smalltalk 4 You shows you how to extend an existing class in VA Smalltalk without changing the owning Application. In VA/Envy, all classes are owned by an Application. If you change the class definition or an existing method, you have to change the owning Application. Today we'll look at adding new methods to existing classes in your own Application. 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 how to extend existing classes in VA Smalltalk - organizing that code into your own Application/SubApplication instead of in the owning one. We've created a new Application and class, and a single method: #isFoo:
If you imagine this method as the kind of test that will be used to find out whether a given object is a "foo sort of thing" or not, then you see that we want a matching method like this:
isFoo
^false
In Object. However, we don't want to add that method to the Application that owns Object. Recall that in ENVY, class definitions are owned by the Application they are defined in. If you need to change and existing method or class definition, you have to create a new version of that Application. However, that's not the case if you merely want to add a new method
In your Application, select the "Classes" menu. Pull down to "Add", and you'll see "Extension" as a possibility. That's what we'll do here:
You'll then get prompted for the class you want to extend:
Finally, add the method in the browser - you've now extended a class owned by a different Application in your own Application:
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.
Join the Facebook Group to discuss the tutorials. You can view the archives here.
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 take a look at Applications and Subapplications in VA Smalltalk. In most circumstances, you can just build configuration maps from "flat" sets of Applications, but there are times that you might want to create sub applications. The most common example is one that exists in the system as shipped by Instantiations - platform specific code:
What we are looking at is on Application - CommonFileSystem - and asset of sub applications. Some of them load regardless of the platform you are on, while others are specific to the platform you are on (Windows, Linux, Unix). Take a look at Application definition in ENVY:
What we have here is a set of apps for all platforms with configuration expressions that specify which ones actually load. The Subapplications are hierarchically organized under the main Application, but can be set up to load only when it's appropriate.
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 Javascript 4 You uses JQuery to count the number of elements (of a specific sort) on a page. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.
Join the Facebook Group to discuss the tutorials. You can view the archives here.
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.
PharoConf was held at Inria Lille the 24 and 25 of May 2012. Two days of Pharo, lots of talks, discussions and short presentations of companies using Pharo.
You can browse the slides (and see some photos snapped at the conference) here.
Today's Smalltalk 4 You looks at the new Spotlight style search in Pharo. This is in Pharo 2.0, which is not released yet - so be aware that you may run into some rough edges with it. 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.
Is Nintendo signalling a desire to expand beyond the casual gaming niche they've done so well with? Take a look at the "pro" controller they are showing off for the next gen console:
Welcome to episode 80 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week we have David Buck talking about Fluid Positioning (automated layout adjustment) for VisualWorks at the STIC conference held in March, 2012.
You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.
To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.
If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!
If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!
Welcome to episode 80 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week we have David Buck talking about Fluid Positioning (automated layout adjustment) for VisualWorks at the STIC conference held in March, 2012.
You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.
To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.
If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!
If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!
Today's Smalltalk 4 You looks at making external API calls using 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 take a look at how to make external API calls from VA Smalltalk. IN this example, we'll call the MessageBoxA API in Windows:
The code looks like this:
| pf |
pf := PlatformFunction fromArray: #('C' 'MessageBoxA' nil 'user32.dll' #(#uint32 #pointer #pointer #uint32) #int32).
pf
callWith: PlatformGlobals::HwndNull
with: 'this is some text' asPSZ
with: 'this is a caption' asPSZ
with: PlatformConstants::MbYesno
To understand what's going on in the ByteArray of arguments, have a look at class PlatformFunction:
Bear in mind that this example is a bit artificial; the class CwPrompter exists in VA< and uses this API already. However, it does give you a simple example of making an API call, and you can follow the same pattern for your own work.
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.