Plumbin'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Plumbin'

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

http://c2.com/doc/plumbin/index.html

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'! off
    "Turn off the model's fluid flow."
 
    model off! !  !FaucetController methodsFor: 'menu messages' stamp: 'ward 7/31/97 20:36'! on
    "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.

Michael


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Plumbin'

Hannes Hirzel
Thank you for digging this out and sending in a note for other people
to have fun as well....

--Hannes

On 4/7/11, michael rice <[hidden email]> wrote:

> I managed to get Ward Cunningham's Plumbin' app running in MVC (v4.2). The
> source (PlumbinSrc.zip) can be downloaded from:
>
> http://c2.com/doc/plumbin/index.html
>
> 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'!
off
>     "Turn off the model's fluid flow."
>
>     model off! !
!FaucetController methodsFor: 'menu messages' stamp: 'ward
> 7/31/97 20:36'!
on
>     "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.
>
> Michael
>
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners