hannes.hirzel at gmail.com
Thu Apr 7 14:55:54 UTC 2011
Thank you for digging this out and sending in a note for other people
to have fun as well....
On 4/7/11, michael rice <nowgate at yahoo.com> wrote:
> 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
!FaucetController methodsFor: 'menu messages' stamp: 'ward 7/31/97
> "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: ''!
> class methodsFor: 'as yet unclassified' stamp: 'mjr 4/1/2011
initialize YellowButtonMenu _
> labels: 'turn on\turn off' withCRs
> lines: #()
> selections: #(on off)! !
> 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.
More information about the Beginners