[squeak-dev] The Trunk: Morphic-nice.707.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 16 15:02:36 UTC 2013


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

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

Name: Morphic-nice.707
Author: nice
Time: 16 December 2013, 4:00:55.177 pm
UUID: 6b1cec19-f7ef-4bc2-a761-8f82e7a4c796
Ancestors: Morphic-nice.706

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

=============== Diff against Morphic-nice.706 ===============

Item was changed:
  ----- Method: Morph>>programmedMouseUp:for: (in category 'debug and other') -----
  programmedMouseUp: anEvent for: aMorph 
  	| aCodeString |
  	self deleteAnyMouseActionIndicators.
  	aCodeString := self valueOfProperty: #mouseUpCodeToRun ifAbsent: [^self].
  	(self fullBounds containsPoint: anEvent cursorPoint) ifFalse: [^self].
  	
  	[(aCodeString isMessageSend) 
  		ifTrue: [aCodeString value]
  		ifFalse: 
  			[Compiler 
  				evaluate: aCodeString
  				for: self
+ 				notifying: nil]] 
- 				notifying: nil
- 				logged: false]] 
  			on: ProgressTargetRequestNotification
  			do: [:ex | ex resume: self]	"in case a save/load progress display needs a home"!

Item was removed:
- ----- Method: MorphicProject>>navigatorFlapVisible (in category 'flaps support') -----
- navigatorFlapVisible
- 	"Answer whether a Navigator flap is visible"
- 
- 	self flag: #toRemove. "unreferenced in image, check eToys"
- 	^ (Flaps sharedFlapsAllowed and: 
- 		[self flapsSuppressed not]) and:
- 			[self isFlapIDEnabled: 'Navigator' translated]!

Item was changed:
  ----- Method: SimpleButtonMorph>>setArguments (in category 'menu') -----
  setArguments
  
  	| s newArgs newArgsArray |
  	s := WriteStream on: ''.
  	arguments do: [:arg | arg printOn: s. s nextPutAll: '. '].
  	newArgs := UIManager default
  		request:
  'Please type the arguments to be sent to the target
  when this button is pressed separated by periods' translated
  		initialAnswer: s contents.
  	newArgs isEmpty ifFalse: [
+ 		newArgsArray := Compiler evaluate: '{', newArgs, '}' for: self.
- 		newArgsArray := Compiler evaluate: '{', newArgs, '}' for: self logged: false.
  		self arguments: newArgsArray].
  !

Item was changed:
  ----- Method: SmalltalkEditor>>doItButtonFromSelection (in category 'do-its') -----
  doItButtonFromSelection
  
  	| button string cm |
  	self lineSelectAndEmptyCheck: [^ nil].
  	button := SimpleButtonMorph new.
  	string := self selection.
  	(model respondsTo: #doItReceiver) 
  		ifTrue: [
  			button setProperty: #rcvr toValue: model doItReceiver.
  			button setProperty: #ctxt toValue: model doItContext].
  
  	cm := (button valueOfProperty: #rcvr) class compilerClass new 
  			compiledMethodFor: string readStream
  			in: (button valueOfProperty: #ctxt)
  			to: (button valueOfProperty: #rcvr)
  			notifying: nil
+ 			ifFail: [^ nil].
- 			ifFail: [^ nil]
- 			logged: false.
  	button setProperty: #cm toValue: cm.
  	button target: [:b |
  		[(b valueOfProperty: #cm) valueWithReceiver: (b valueOfProperty: #rcvr) arguments: 
  			((b valueOfProperty: #ctxt) ifNotNil: [{(b valueOfProperty: #ctxt) }] ifNil: [#()])]
  		on: OutOfScopeNotification 
  		do: [ :ex | ex resume: true]];
  		actionSelector: #value:;
  		arguments: {button}.
  	button label: string.
  	^ button.
  !

Item was changed:
  ----- Method: SmalltalkEditor>>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: [morph flash. ^ self].
- 			ifFail: [morph 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 Squeak-dev mailing list