The Trunk: System-mt.722.mcz

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

The Trunk: System-mt.722.mcz

commits-2
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.722.mcz

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

Name: System-mt.722
Author: mt
Time: 12 April 2015, 9:08:20.54 pm
UUID: 44ce6f36-9f13-6e44-b430-ef5a8933a51c
Ancestors: System-ul.721

MVC compatibility fix for the "Do..." menu.

=============== Diff against System-ul.721 ===============

Item was changed:
  ----- Method: Utilities class>>offerCommonRequests (in category 'common requests') -----
  offerCommonRequests
  "Offer up the common-requests menu.  If the user chooses one, then evaluate it, and -- provided the value is a number or string -- show it in the Transcript."
 
  "Utilities offerCommonRequests"
 
+ | reply result index normalItemCount strings lines |
- | reply result aMenu index normalItemCount strings |
 
  Smalltalk isMorphic ifTrue: [^ self offerCommonRequestsInMorphic].
 
  (CommonRequestStrings == nil or: [CommonRequestStrings isKindOf: Array])
  ifTrue:
  [self initializeCommonRequestStrings].
 
  strings := CommonRequestStrings contents.
+ lines := strings asString lines copyWith: 'edit this menu'.
+ normalItemCount := lines size - 1.
+
+ index := UIManager default
+ chooseFrom: lines
- normalItemCount := strings asString lineCount.
- aMenu := UIManager default
- chooseFrom: (strings asString lines copyWith: 'edit this menu')
  lines: (Array with: normalItemCount).
 
- index := aMenu startUp.
  index = 0 ifTrue: [^ self].
- reply := aMenu labelString lineNumber: index.
- reply size = 0 ifTrue: [^ self].
  index > normalItemCount ifTrue:
  [^ self editCommonRequestStrings].
 
+ reply := lines at: index.
+ reply size = 0 ifTrue: [^ self].
+
+ result := Compiler evaluate: reply.
- result := self evaluate: reply in: nil to: nil.
  (result isNumber) | (result isString)
  ifTrue:
  [Transcript cr; nextPutAll: result printString]!