Home Steve Waring's Journal

Archives for December 2002


change Monitor ShellWindows

Uploaded a new article Monitor ShellWindows.

Overview

Use the IShellWindows interface to access all open ShellWindows, including InternetExplorer and WindowsExplorer windows. The ExplorerMonitor package makes use of Dolphin's Active-x event sinks to track changes to the list of open windows, and to track when each window changes its location.

explorerMonitor

Link 6:04:43 PM, Saturday, 28 December 2002 Email

change Dolphin Tip - Generate mask testing methods

Found some very useful Dolphin goodies from the Smalltalking people.

The Development Tools package by Bruno Buzzi Brasesco contained some code generation classes which reminded me of a code generation class I find handy.

The tip article Generate mask testing methods contains a script class that generates a string in chunk-format, which can be filed in to add methods which get and set bits in a flag instance variable.

It probably only saves me 2 minutes of typing every couple of weeks; writing this class shows how lazy I can be at times :)

Link 9:18:38 PM, Thursday, 26 December 2002 Email

change Animation Control update

Uploaded a new bug-fix version of SWAnimationControl_5.0.1.zip, which is part of the Animation article.

The bug fix is in the Animation>>assertValidRange method (Changed the message send from #end to #stop).

This package has limited tests, it just happened that this was one method that did have a test. I rebuilt my image, and somehow a loose method; Interval>>end had snuck into my previous image.

I make the assumption that any test is better than no test, and my experience is that tests tend to multiply with time ... for me, it is easier to add a new test, or a variant of an old test to an existing TestCase.

The problem is that usually these tests are what I think of as "probe tests". I see them as a thing (my object) being held in place by squewers going into it ... not a solid structure (and not a pretty picture!). If I want to make changes, usually it means taking the object out of the probes, making the changes and putting the probes back in ... often they get twisted out of shape.

My favorite combination of tests/objects is what I think of as plasticine tests ... an object wrapped in plasticine. Did you play with plasticine when you were kid? :) ... you can pound it, chuck it against the wall ... throw it up on the ceiling if you like, and it survives and adapts.

I have found that good Mock objects are often an important ingredient in having plasticine tests.

Since my latest application has more User Interface classes than my previous projects, I have started writing limited tests for my Presenters, however they are only probe tests, and mostly limited to testing helper/utility methods in the presenter.

A set of mock View classes that could be substituted for Dolphin's base View classes could make testing Presenters more complete. It would be cool if I could write:

MyPresenterTest>>setup

super setup.
presenter := MyPresenter show: 'Test view'

and then write a test like:

MyPresenterTest>>testClick


presenter myListView userClicksIndex: 2.
self assert: presenter myStatusBar value = 'foo 2'.

It would be cool, but I think it would be alot of work to create the Mock View classes. Maybe Object-Arts have internal mock classes they use for their own testing ... if so, I think it would be a great feature for Dolphin 6! :)

Link 4:52:08 PM, Thursday, 26 December 2002 Email

change Holidays

Welcome!, hope you had a happy holidays, and didnt eat and drink quite as much as I did yesterday :)

It is a rainy Boxing day afternoon here, perfect weather for sitting back, watching the Cricket, and catching up after a week off.

Link 4:11:41 PM, Thursday, 26 December 2002 Email

change Logo

Catching up on old news, I came across some new Powered by Smalltalk logos. One by Jernej caught my eye. I think it looks great, and I am switching to it with this post.

Link 8:14:53 AM, Monday, 16 December 2002 Email

change ListTreeView

I have been using Chris Uppal's ListTreeView for the past couple of weeks, and it is a very impressive goodie for Dolphin Smalltalk. Chris has done an amazing job of integrating it into Dolphin and providing the full Windows behavior for this kind of control. It works with either a ListPresenter or a TreePresenter, and while I have not made use of it, there is even a Multiple-select class.

The code is very well commented and I have been using it fairly heavily for the past weeks without problem. I originally hide it behind a ListView, and mirrored the selections from the ListView, but I have now removed the ListView completely. While I would not have switched to a standard TreeView, this has made a big improvement in the usability of my application.

A big thank-you to Chris for the work he put into it, and his attention to detail ... and for making it available!

FWIW: A screen shot of the ListTreeView in action in my current application

Link 3:40:45 PM, Saturday, 14 December 2002 Email

change Working

It has been a while since my last entry. I have been hard at work, neglecting the blog, along with my email/news and generally everything else that doesnt start with an "S" and end in "t". Fortunately that includes watching the Aussies Smash the poms in the Cricket (I had to find some way to get that in :)

I have a presentation to give on Wednesday, and then I am going to take some time off over Christmas. For the presentation I have been writing some documentation. While I dont enjoy writing documentation, I find it always has the positive side effect of highlighting what I need to do in the code. It forces me to look at the application from a different perspective, and things that are hard to explain, often need attention in the code.

Link 3:15:46 PM, Saturday, 14 December 2002 Email

My Links

Back to current Journal

Dolphinharbor home of the open source software I have written for Dolphin Smalltalk.
About me.

Powered By

Dolphin SmalltalkDolphin Smalltalk
YAXO and SIXX
Get the BottomFeeder RSS ViewerBottomFeeder RSS Viewer
Apache
FutureQuest


Copyright 2002 Steve Waring