The Trunk: Tools-mt.875.mcz

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

The Trunk: Tools-mt.875.mcz

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

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

Name: Tools-mt.875
Author: mt
Time: 14 August 2019, 1:16:03.729512 pm
UUID: 6818d344-b9a1-ab49-bda7-a309a2e2c1c2
Ancestors: Tools-mt.874

Makes icons and dragging for deprecated messages work again. Hmm... it is really interesting to see how string-vs-text can blow up things.

Maybe use an approach similar to MessageSet class >> #parse:toClassAndSelector instead of #asString? There could be any fancy representation of a message in the message list.

=============== Diff against Tools-mt.874 ===============

Item was changed:
  ----- Method: Browser>>dragFromMessageList: (in category 'drag and drop') -----
  dragFromMessageList: index
  "Drag a method from the browser"
+
+ self flag: #refactor. "mt: Maybe use an approach similar to MessageSet class >> #parse:toClassAndSelector instead of #asString? There could be any fancy representation of a message in the message list."
+ ^self selectedClassOrMetaClass compiledMethodAt: (self messageList at: index) asString ifAbsent:[nil]!
- ^self selectedClassOrMetaClass compiledMethodAt: (self messageList at: index) ifAbsent:[nil]!

Item was changed:
  ----- Method: Browser>>messageIconAt: (in category 'message list') -----
  messageIconAt: anIndex
 
  self class showMessageIcons ifFalse: [^ nil].
+ ^ self messageIconFor: (self messageList at: anIndex ifAbsent: [^nil]) asString!
- ^ self messageIconFor: (self messageList at: anIndex ifAbsent: [^nil])!

Item was changed:
  ----- Method: Browser>>messageListIndex: (in category 'message list') -----
  messageListIndex: anInteger
  "Set the selected message selector to be the one indexed by anInteger."
 
+ self selectMessageNamed: (self messageList at: anInteger ifPresent: [:lbl | lbl asString] ifAbsent: [nil] )!
- self selectMessageNamed: (self messageList at: anInteger ifAbsent: [nil])!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.875.mcz

Jakob Reschke
Am Mi., 14. Aug. 2019 um 13:16 Uhr schrieb <[hidden email]>:

Maybe use an approach similar to MessageSet class >> #parse:toClassAndSelector instead of #asString? There could be any fancy representation of a message in the message list.

 
Or create a message that turns a string from the list into a MethodReference, and use it throughout. There should be only one place per tool that knows how to turn the texts of the message list into a code reference.


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.875.mcz

marcel.taeumel
Hmmm... The TimeProfileBrowser mis-uses the message list to store arbitrary (MessageTally) information. :-)

Am 14.08.2019 13:44:35 schrieb Jakob Reschke <[hidden email]>:

Am Mi., 14. Aug. 2019 um 13:16 Uhr schrieb <[hidden email]>:

Maybe use an approach similar to MessageSet class >> #parse:toClassAndSelector instead of #asString? There could be any fancy representation of a message in the message list.

 
Or create a message that turns a string from the list into a MethodReference, and use it throughout. There should be only one place per tool that knows how to turn the texts of the message list into a code reference.


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.875.mcz

Jakob Reschke
That means the conversion can also have nil as the result, or better add a failure block to the conversion message.

Am Mi., 14. Aug. 2019 um 14:49 Uhr schrieb Marcel Taeumel <[hidden email]>:
Hmmm... The TimeProfileBrowser mis-uses the message list to store arbitrary (MessageTally) information. :-)

Am 14.08.2019 13:44:35 schrieb Jakob Reschke <[hidden email]>:

Am Mi., 14. Aug. 2019 um 13:16 Uhr schrieb <[hidden email]>:

Maybe use an approach similar to MessageSet class >> #parse:toClassAndSelector instead of #asString? There could be any fancy representation of a message in the message list.

 
Or create a message that turns a string from the list into a MethodReference, and use it throughout. There should be only one place per tool that knows how to turn the texts of the message list into a code reference.