Today's Smalltalk 4 You looks at reflection using instance variable names. 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 put a few pieces together on reflection in Smalltalk. Let's assume that you've read some data from an external source into a dictionary, with data like this:
Now, what if you want to create an instance of class Person and fill it with that data - but not using the sort of slot binding approach assumed by #instVarAt:put:? Consider the following:
person := Person new.
dict keysAndValuesDo: [:key :value |
| msg |
msg := (key, ':') asSymbol.
person perform: msg with: value].
^person
Notice how we assume that the dictionary keys are the names of variables, and we construct the messages that get sent to the object. Realistically, you would want exception/error handling around that, for cases where the file format and the class format get out of synch - but that's the basic approach, and it's used commonly in Smalltalk.
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.
You have to love the way big companies operate (other than Apple - the kind of issue I had with MS this morning simply has not happened to me with Apple):
My XBox Live automated charge failed - because it tried to use an expired card that I've never been able to remove from the account
The email sent me to a billing page, which told me that my Hotmail address had been sending junk mail, so the account was suspended. Which is fascinating, since I don't have a Hotmail account.
Then I spent 10 minutes trying to find a phone number on the MS website, after it told me I needed to call.
I finally got customer service, and they were able to delete the bad card and get the bill dealt with
This chewed up 45 minutes of my day (most of it on hold). The part I really don't understand is the suspension message, since customer service told me that there was no account suspension. Nice to know that MS can build informative websites....
I think this was inevitable - other than gamers (who are always after the fastest/newest equipment), very few people need a new machine - anything made within the last five years or so works just fine for most business needs:
It has now been four months since Windows 8 was released, and the latest figures show that its growth — in terms of market share, mind share, and the number of apps in the Windows 8 Store — is almost at a standstill.
That said, MS can't be happy about this comparison:
It’s a bitter pill to swallow, but Windows Vista actually enjoyed faster growth than Windows 8
Welcome to episode 117 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week Dave and I talked about patching deployed Smalltalk applications - there are a few interesting things you can do beyond "replace the entire image", and we talk about some of the approaches
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 117 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week Dave and I talked about patching deployed Smalltalk applications - there are a few interesting things you can do beyond "replace the entire image", and we talk about some of the approaches
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 the sample browser that comes with ObjectSTudio - a useful repository of simple examples. 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.
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 how GUIs are constructed in ObjectStudio. 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 Javascript 4 You looks at using the elevation service in google maps with Javascript. 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.
Today's Smalltalk 4 You looks at collection limitations, and how they can be bypassed using streams. 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 streams and collections. We've pointed out before that streaming works across any collection (not just strings) - but streaming also "bypasses" some of the limitations built into some of the collection classes. Take an Array, for instance. Being fixed size, this will fail:
array := #(1 2 3 4).
array add: 5.
Normally, that's not an issue - you probably picked an Array because you had a fixed set of objects, and didn't need to grow it. But what if you did? Well, you can use a stream:
If you inspect the results, you'll see that you still have an Array, now with 5 objects rather than 4. It's actually a copy of the initial array, not the same one grown. You could, of course, accomplish the same thing via the transformations APIs:
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.