[Pkg] The Trunk: ST80-nice.167.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 16 15:10:21 UTC 2013


Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.167.mcz

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

Name: ST80-nice.167
Author: nice
Time: 16 December 2013, 4:09:53.315 pm
UUID: 47ef776e-da08-4939-90ba-2fa985471bc6
Ancestors: ST80-dtl.166

Use non logging Compiler protocol rather than providing a logged: false argument.

=============== Diff against ST80-dtl.166 ===============

Item was changed:
  ----- Method: ParagraphEditor>>tallySelection (in category 'do-its') -----
  tallySelection
  	"Treat the current selection as an expression; evaluate it and return the time took for this evaluation"
  	| result rcvr ctxt valueAsString v |
  	self lineSelectAndEmptyCheck: [^self].
  
  	(model respondsTo: #doItReceiver) 
  		ifTrue: [ rcvr := model doItReceiver.
  				ctxt := model doItContext]
  		ifFalse: [rcvr := ctxt := nil].
  	result := [ | cm |
  		cm := rcvr class evaluatorClass new 
  			compiledMethodFor: self selectionAsStream
  			in: ctxt
  			to: rcvr
  			notifying: self
+ 			ifFail: [self flash. ^self].
- 			ifFail: [self flash. ^self]
- 			logged: false.
  		Time millisecondsToRun: 
  			[v := cm valueWithReceiver: rcvr arguments: #() ].
  	] 
  		on: OutOfScopeNotification 
  		do: [ :ex | ex resume: true].
  
  	"We do not want to have large result displayed"
  	valueAsString := v printString.
  	(valueAsString size > 30) ifTrue: [valueAsString := (valueAsString copyFrom: 1 to: 30), '...'].
  	PopUpMenu 
  		inform: 'Time to compile and execute: ', result printString, 'ms res: ', valueAsString.
  !



More information about the Packages mailing list