[Newbies] Plumbin'

michael rice nowgate at yahoo.com
Thu Apr 7 14:41:47 UTC 2011

I managed to get Ward Cunningham's Plumbin' app running in MVC (v4.2). The source (PlumbinSrc.zip) can be downloaded from:


but be aware of proper order of fileIns, Plumbin-Framework.st MUST be first. I don't think order is important for the rest of the fileIns.

Also, I had to write a Faucet controller. For those interested in seeing this fine example of Smalltalk view tiling, here is the source for that controller (fileIn AFTER Plumbin-StandardTiles.st):

'From Squeak4.2 of 4 February 2011 [latest update: #10966] on 1 April 2011 at 10:48:53 am'!
TileController subclass: #FaucetController     instanceVariableNames: ''     classVariableNames: 'YellowButtonMenu'     poolDictionaries: ''     category: 'Plumbin-Standard Tiles'! 
!FaucetController methodsFor: 'menu messages' stamp: 'ward 7/31/97 20:36'!
    "Turn off the model's fluid flow." 
    model off! ! 
!FaucetController methodsFor: 'menu messages' stamp: 'ward 7/31/97 20:36'!
    "Turn on the model's fluid flow." 
    model on! !  
!FaucetController methodsFor: 'pluggable menus' stamp: 'mjr 4/1/2011 10:46'!
getPluggableYellowButtonMenu: shiftKeyState     ^ YellowButtonMenu! ! 
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! 
FaucetController class     instanceVariableNames: ''! 
!FaucetController class methodsFor: 'as yet unclassified' stamp: 'mjr 4/1/2011 10:44'!
"FaucetController initialize" 
initialize     YellowButtonMenu _ SelectionMenu 
        labels: 'turn on\turn off' withCRs 
        lines: #() 
        selections: #(on off)! ! 
FaucetController initialize!

DoIt on "MosaicView openOn: (Mosaic example)" will open the app. I suggest putting the doIt text in a morphic workspace window and copying it from there before opening an MVC project, then copying it to an MVC workspace window to doIt, because keyboard processing in MVC will jumble up the characters if you try typing them to an MVC workspace at anywhere near normal speed.   

Tiles can then be moved about with the red (leftmost button) and duplicated with a shift red button.

Faucet can be turned on/off with the yellow (rightmost) button (menu). Water drop on output spout will accordingly appear or disappear. Moving faucet (or spout) away from piping network will accomplish same.

The pressure tank provides for water storage. It will only fill up if it has access to (on) faucet(s) and drain only when said faucet(s) are turned off, BUT the cursor MUST be over the pressure tank tile. The water drop on the spout will eventually disappear as pressure tank drains.

Have fun.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20110407/9011c3cc/attachment.htm

More information about the Beginners mailing list