'From Squeak3.1alpha of 28 February 2001 [latest update: #4207] on 25 July 2001 at 12:58:32 am'! "Change Set: commonRequestsFix-sw Date: 25 July 2001 Author: Scott Wallace Fixes a bug in the processing of edits to the common-request-strings -- blank lines were causing problems; now they don't."! !Utilities class methodsFor: 'common requests' stamp: 'sw 7/24/2001 22:13'! offerCommonRequestsInMorphic "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" | aMenu strings | (CommonRequestStrings == nil or: [CommonRequestStrings isKindOf: Array]) ifTrue: [self initializeCommonRequestStrings]. strings _ CommonRequestStrings contents. aMenu _ MenuMorph new. aMenu title: 'Common Requests'. aMenu addStayUpItem. strings asString linesDo: [:aString | aString = '-' ifTrue: [aMenu addLine] ifFalse: [aString size == 0 ifTrue: [aString _ ' ']. aMenu add: aString target: self selector: #eval: argument: aString]]. aMenu addLine. aMenu add: 'edit this list' target: self action: #editCommonRequestStrings. aMenu popUpInWorld: self currentWorld! !