The Trunk: MorphicExtras-dtl.56.mcz

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

The Trunk: MorphicExtras-dtl.56.mcz

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

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

Name: MorphicExtras-dtl.56
Author: dtl
Time: 13 November 2009, 4:22:45 am
UUID: 05f08bbf-8ef2-44fa-925a-5fb9f2350f36
Ancestors: MorphicExtras-dtl.55

Fix underscores and remove duplicate code in PartsBin initialization

=============== Diff against MorphicExtras-dtl.55 ===============

Item was changed:
  ----- Method: PartsBin>>listDirection:quadList:buttonClass: (in category 'initialization') -----
  listDirection: aListDirection quadList: quadList buttonClass: buttonClass
  "Initialize the receiver to run horizontally or vertically, obtaining its elements from the list of tuples of the form:
  (<receiver> <selector> <label> <balloonHelp>)
  Used by external package Connectors."
 
  | aButton aClass |
  self layoutPolicy: TableLayout new.
  self listDirection: aListDirection.
  self wrapCentering: #topLeft.
  self layoutInset: 2.
  self cellPositioning: #bottomCenter.
 
  aListDirection == #leftToRight
  ifTrue:
  [self vResizing: #rigid.
  self hResizing: #spaceFill.
  self wrapDirection: #topToBottom]
  ifFalse:
  [self hResizing: #rigid.
  self vResizing: #spaceFill.
  self wrapDirection: #leftToRight].
  quadList do:
  [:tuple |
+ aClass := Smalltalk at: tuple first.
+ aButton := buttonClass new initializeWithThumbnail: (self class thumbnailForQuad: tuple color: self color) withLabel: tuple third andColor: self color andSend: tuple second to: aClass.
- aClass _ Smalltalk at: tuple first.
- aButton _ buttonClass new initializeWithThumbnail: (self class thumbnailForQuad: tuple color: self color) withLabel: tuple third andColor: self color andSend: tuple second to: aClass.
  (tuple size > 3 and: [tuple fourth isEmptyOrNil not]) ifTrue:
  [aButton setBalloonText: tuple fourth].
    self addMorphBack: aButton]!

Item was changed:
  ----- Method: PartsBin>>listDirection:quadList: (in category 'initialization') -----
  listDirection: aListDirection quadList: quadList
  "Initialize the receiver to run horizontally or vertically, obtaining its elements from the list of tuples of the form:
  (<receiver> <selector> <label> <balloonHelp>)"
 
+ ^self listDirection: aListDirection quadList: quadList buttonClass: IconicButton!
- | aButton aClass |
- self layoutPolicy: TableLayout new.
- self listDirection: aListDirection.
- self wrapCentering: #topLeft.
- self layoutInset: 2.
- self cellPositioning: #bottomCenter.
-
- aListDirection == #leftToRight
- ifTrue:
- [self vResizing: #rigid.
- self hResizing: #spaceFill.
- self wrapDirection: #topToBottom]
- ifFalse:
- [self hResizing: #rigid.
- self vResizing: #spaceFill.
- self wrapDirection: #leftToRight].
- quadList do:
- [:tuple |
- aClass := Smalltalk at: tuple first.
- aButton := IconicButton new initializeWithThumbnail: (self class thumbnailForQuad: tuple color: self color) withLabel: tuple third andColor: self color andSend: tuple second to: aClass.
- (tuple size > 3 and: [tuple fourth isEmptyOrNil not]) ifTrue:
- [aButton setBalloonText: tuple fourth].
-   self addMorphBack: aButton]!