The Trunk: Morphic-dtl.340.mcz

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

The Trunk: Morphic-dtl.340.mcz

commits-2
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.340.mcz

==================== Summary ====================

Name: Morphic-dtl.340
Author: dtl
Time: 12 February 2010, 9:48:05.519 pm
UUID: 07b8399c-9850-4695-8ef2-eb85b48301e4
Ancestors: Morphic-cmm.339

Remove explicit reference to MVC Switch from PluggableButtonMorph class>>example.
Implement MorphicProject>>showImage:named: to eliminate MVC/Morphic dependency in HTTPSocket.

=============== Diff against Morphic-cmm.339 ===============

Item was changed:
  ----- Method: PluggableButtonMorph class>>example (in category 'example') -----
  example
  "PluggableButtonMorph example openInWorld"
 
+ | s1 s2 s3 b1 b2 b3 row switchClass |
+ switchClass := Smalltalk at: #Switch ifAbsent: [^self inform: 'MVC class Switch not present'].
+ s1 := switchClass new.
+ s2 := switchClass new turnOn.
+ s3 := switchClass new.
- | s1 s2 s3 b1 b2 b3 row |
- s1 := Switch new.
- s2 := Switch new turnOn.
- s3 := Switch new.
  s2 onAction: [s3 turnOff].
  s3 onAction: [s2 turnOff].
  b1 := (PluggableButtonMorph on: s1 getState: #isOn action: #switch) label: 'S1'.
  b2 := (PluggableButtonMorph on: s2 getState: #isOn action: #turnOn) label: 'S2'.
  b3 := (PluggableButtonMorph on: s3 getState: #isOn action: #turnOn) label: 'S3'.
  b1
  hResizing: #spaceFill;
  vResizing: #spaceFill.
  b2
  hResizing: #spaceFill;
  vResizing: #spaceFill.
  b3
  hResizing: #spaceFill;
  vResizing: #spaceFill.
 
  row := AlignmentMorph newRow
  hResizing: #spaceFill;
  vResizing: #spaceFill;
  addAllMorphs: (Array with: b1 with: b2 with: b3);
  extent: 120@35.
  ^ row
  !

Item was added:
+ ----- Method: MorphicProject>>showImage:named: (in category 'utilities') -----
+ showImage: aForm named: imageName
+ "Show an image, possibly attached to the pointer for positioning"
+
+ HandMorph attach: (World drawingClass withForm: aForm)
+ !