Smalltalk in Seattle
There's a Smalltalk user's group in Seattle again. No meetings scheduled yet - so if you're in Seattle and using Smalltalk, why not help out with that?
Some StS Video Is Up
Some of the video from Smalltalk Solutions 2011 is up - if you go to the relevant STIC page, there's a list of links. Some of them lead to video, and some of them lead only to the slide decks (although those all say that the video will be forthcoming). You have to click through on each link to tell whether there's video or not; it would be nice if that info were on the index page. The good news is, the video is all hosted on Vimeo, so it'll work on any mobile device you use, not just flash enabled ones.
Technorati Tags: sts11
Where is that Method Defined?
Sometimes you look at a method's declared location and wonder. Take this method in class Text (VisualWorks), for example:
allItalic "Set the emphasis for all characters in the receiver to be italic." self emphasizeAllWith: #italic
Looks like a generic method that should be part of the core aspect of class Text, right? Well, it's not - it's located in package Debugger-Support. This cropped up on us this week, due to the way we do builds now. Instead of RTP stripping, our tool just yanks packages - including Debugger-Support. Whoops. The solution I came up with was to clone the method with a new name in one of our own packages, and change the references in our code (thankfully, only one) to use the new method. This looks like something Cincom should clean up though...
Test Reporting with SUnitToo
What I wanted was a simple configuration object - it would hold a collection of TestCase class names, in a specific order. Those classes have a class method, #order which specifies the order for the tests in the class. If the method is absent, then I just query the class for all test methods and use the order that comes back. Actually running tests is pretty easy, and there's a nice class - Results - already there to gather results for you:
tests do: [:eachTest | | tc | tc := aTestCaseClass selector: eachTest. self orderRun add: eachTest. tc run]
To get the results saved, all you do is something like this:
Results collectWhile: [self runTestsInOrder].
You end up with a nice set of passed, failed, and errored out tests, which you can then easily report on. I created a simple little reporter object that dropped out three html tables, each wrapped in a named div (so that someone with some CSS awareness could do something useful with the results). It all came together pretty quickly. Next up: creating a simple UI to create the test configurations.
Why Smalltalk
Andy Berry explains why he has used - and continues to use - Smalltalk as his software development platform of choice.
Updating Packages in a Bundle
The development process where I work treats bundles as configurations - manifests for all the proper (for that trunk/branch of development) that will go into a release. Given that, individual developers generally don't publish a bundle. A build is created, and part of that process spits out an associated development image. From there, the developer works (and publishes) the package(s) he or she is responsible for.
So... one of the things I got tired of was "let's see what packages have been updated inside the bundle" - so I added a method like this to the browser:
updatePackagesInBundle "add menu item to RB" <menuItem: 'Update Packages in Bundle...' icon: nil nameKey: #mesPackagesUpdate enablement: #isBundleSelected indication: nil menu: #(#pundleMenu) position: 200.1> | pundle stream version match | (self pundles size > 1 or: [Store.DbRegistry isConnected not]) ifTrue: [^Dialog warn: 'Select one bundle and/or establish a Store Connection']. pundle := self pundles first. stream := pundle versionString readStream. stream skip: 1. version := stream upTo: $,. match := version size
I have a class that handles the actual updating, BundleDef. The relevant code there looks like this:
getRecordsAndUpdatePackages self getMatchingRecord. self allContainedPackagesAndBundles. self updateAllPackages.
That gets any newer published package in the same branch (based on the version string passed in), and then iteratively updates each package (including those in contained bundles). The work is in the last two methods above:
allContainedPackagesAndBundles "get the full collection of contained packages and bundles" self allContainedPackagesAndBundlesFor: pundle. containedBundles add: pundle. allContainedPackagesAndBundlesFor: aBundle "answer a collection of all the packages I have, regardless of bundles in the middle" | items | items := aBundle containedItems. items do: [:each | each isBundle ifTrue: [self allContainedPackagesAndBundlesFor: each. containedBundles add: each] ifFalse: [containedPackages add: each]].
And finally, the check and update:
updateAllPackages "iterate over the packages and update them" containedPackages do: [:each | | all newerMatch | all := Store.Package allVersionsWithName: each name newerThan: each. newerMatch := all detect: [:each1 | versionFragment match: each1 version] ifNone: [nil]. newerMatch ifNotNil: [Transcript show: 'Updating: ', each name; cr. newerMatch loadSrc]].
I just verified that this works in the upcoming 7.8 release of VW; it probably does use the (soon to be deprecated) Store objects though. I'll have to investigate that soon
Technorati Tags: visualworks, store, bundle
The Place for Smalltalk
A new Smalltalk hosting environment (code repository) is in the process of bootstrapping:
We've been working on a new code repository & project management application for Smalltalk with ESUG named SmalltalkHub. If everything goes fine, the app should be in public beta in a week. The source code of SmalltalkHub will be available at the same moment (the project itself is hosted by SmalltalkHub).
Nicholas Petton has posted a screen shot of the work in progress.
Technorati Tags: squeak, pharo, monticello
Pharo 1.2.1 is Out
The Pharo Project is proud to announce the release of Pharo 1.2.1, the third major release of this clean, innovative, open-source Smalltalk environment.
Follow the link for more details and download info.
Technorati Tags: pharo
Previous | Next | (1107 total) |