'From Squeak3.7alpha of ''11 September 2003'' [latest update: #5657] on 19 January 2004 at 9:03:02 pm'! "Change Set: KCP-147- Date: 19 January 2004 Author: stephane ducasse Move Utilities>>evaluate to Compiler its natural place"! !Compiler methodsFor: 'public access' stamp: 'sd 1/19/2004 20:58'! evaluate: aString in: aContext to: aReceiver "evaluate aString in the given context, and return the result. 2/2/96 sw" | result | result _ self evaluate: aString in: aContext to: aReceiver notifying: nil ifFail: [^ #failedDoit]. ^ result! ! !ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 1/19/2004 20:59'! presentSpecialMenu "Present a list of expressions, and if the user chooses one, evaluate it in the context of the receiver, a ParagraphEditor. Primarily for debugging, this provides a convenient way to talk to the various views, controllers, and models associated with any text pane" | reply items | self terminateAndInitializeAround: [reply _ (PopUpMenu labelArray: (items _ self specialMenuItems) lines: #()) startUp. reply = 0 ifTrue: [^ self]. Compiler new evaluate: (items at: reply) in: [] to: self] ! ! !Utilities class methodsFor: 'common requests' stamp: 'sd 1/19/2004 20:59'! eval: aString "Evaluate the string in a neutral context, and under certain circumstances print the result in the transcript" | result | result _ Compiler new evaluate: aString in: nil to: nil. (result isKindOf: Number) | (result isKindOf: String) ifTrue: [Transcript cr; nextPutAll: result printString]! ! !Utilities class methodsFor: 'common requests' stamp: 'sd 1/19/2004 20:58'! evaluate: aString in: aContext to: aReceiver "evaluate aString in the given context, and return the result. 2/2/96 sw" self deprecated: 'Use Compiler>>evaluate: aString in: aContext to: aReceiver'. ^ Compiler new evaluate: aString in: aContext to: aReceiver! !