The Trunk: Morphic-ar.374.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-ar.374.mcz

commits-2
Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.374.mcz

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

Name: Morphic-ar.374
Author: ar
Time: 5 March 2010, 8:59:20.026 pm
UUID: c88b7bf1-a99c-b640-8be6-7a637dc19fb5
Ancestors: Morphic-laza.373

Avoid dictionary protocol in Smalltalk.

=============== Diff against Morphic-laza.373 ===============

Item was changed:
  ----- Method: MorphicProject>>pauseSoundPlayers (in category 'enter') -----
  pauseSoundPlayers
  "Pause sound players, subject to preference settings"
 
  (world hasProperty: #letTheMusicPlay)
  ifTrue: [world removeProperty: #letTheMusicPlay]
+ ifFalse: [Smalltalk at: #ScorePlayer ifPresent:
- ifFalse: [Smalltalk at: #ScorePlayer ifPresentAndInMemory:
  [:playerClass | playerClass allSubInstancesDo:
  [:player | player pause]]]
  !

Item was changed:
  ----- Method: TextEditor>>referencesToIt (in category 'menu messages') -----
  referencesToIt
  "Open a references browser on the selected symbol"
 
  | aSymbol |
  self selectLine.
  ((aSymbol := self selectedSymbol) == nil or:
+ [(Smalltalk globals includesKey: aSymbol) not])
- [(Smalltalk includesKey: aSymbol) not])
  ifTrue: [^ morph flash].
 
+ self systemNavigation browseAllCallsOn: (Smalltalk globals associationAt: self selectedSymbol)!
- self systemNavigation browseAllCallsOn: (Smalltalk associationAt: self selectedSymbol)!

Item was changed:
  ----- Method: TextEditor>>explainClass: (in category 'explain') -----
  explainClass: symbol
  "Is symbol a class variable or a pool variable?"
  | class reply classes |
  (model respondsTo: #selectedClassOrMetaClass)
  ifFalse: [^ nil].
  (class := model selectedClassOrMetaClass) ifNil: [^ nil].
  "no class is selected"
  (class isKindOf: Metaclass)
  ifTrue: [class := class soleInstance].
  classes := class withAllSuperclasses.
  "class variables"
  reply := classes detect: [:each | each classVarNames anySatisfy: [:name | symbol = name]]
  ifNone: [].
  reply == nil ifFalse: [^ '"is a class variable, defined in class ' , reply printString , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , reply printString , ' classPool associationAt: #' , symbol , ').'].
  "pool variables"
  classes do: [:each | each sharedPools
  anySatisfy: [:pool | (pool includesKey: symbol)
  and:
  [reply := pool.
  true]]].
  reply
  ifNil: [(Undeclared includesKey: symbol)
  ifTrue: [^ '"is an undeclared variable.' , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (Undeclared associationAt: #' , symbol , ').']]
  ifNotNil:
  [classes := WriteStream on: Array new.
  self systemNavigation
  allBehaviorsDo: [:each | (each sharedPools
  detect:
  [:pool |
  pool == reply]
  ifNone: [])
  ~~ nil ifTrue: [classes nextPut: each]].
  "Perhaps not print whole list of classes if too long. (unlikely)"
+ ^ '"is a pool variable from the pool ' , (Smalltalk globals keyAtIdentityValue: reply) asString , ', which is used by the following classes ' , classes contents printString , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , (Smalltalk globals keyAtIdentityValue: reply) asString , ' bindingOf: #' , symbol , ').'].
- ^ '"is a pool variable from the pool ' , (Smalltalk keyAtIdentityValue: reply) asString , ', which is used by the following classes ' , classes contents printString , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , (Smalltalk keyAtIdentityValue: reply) asString , ' bindingOf: #' , symbol , ').'].
  ^ nil!