The Trunk: Morphic-nice.1747.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-nice.1747.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1747.mcz

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

Name: Morphic-nice.1747
Author: nice
Time: 13 April 2021, 4:39:30.44342 pm
UUID: 84977ec2-5a36-cd45-9eae-15db41b3963f
Ancestors: Morphic-mt.1746

Use isSymbol rather than isKindOf: Symbol

=============== Diff against Morphic-mt.1746 ===============

Item was changed:
  ----- Method: TheWorldMenu>>fillIn:from: (in category 'construction') -----
  fillIn: aMenu from: dataForMenu
  "A menu constructor utility by RAA.  dataForMenu is a list of items which mean:
  nil Indicates to add a line
 
  first element is symbol Add updating item with the symbol as the wording selector
  second element is a list second element has the receiver and selector
 
  first element is a string Add menu item with the string as its wording
  second element is a list second element has the receiver and selector
 
  a third element exists Use it as the balloon text
  a fourth element exists Use it as the enablement selector (updating case only)"
 
 
  dataForMenu do: [ :itemData | | item |
  itemData ifNil: [aMenu addLine] ifNotNil:
+ [item := itemData first isSymbol
- [item := (itemData first isKindOf: Symbol)
  ifTrue:
  [aMenu
  addUpdating: itemData first
  target: self
  selector: #doMenuItem:with:
  argumentList: {itemData second}]
  ifFalse:
  [aMenu
  add: itemData first translated
  target: self
  selector: #doMenuItem:with:
  argumentList: {itemData second}].
  itemData size >= 3 ifTrue:
  [aMenu balloonTextForLastItem: itemData third translated.
  itemData size >= 4 ifTrue:
  [item enablementSelector: itemData fourth]]]].
 
  ^ aMenu!