'From Squeak3.3alpha of 18 January 2002 [latest update: #4954] on 12 August 2002 at 1:47:32 am'! "Change Set: crInTypeahead-sw Date: 12 August 2002 Author: Scott Wallace Addresses the bug that hitting Return would sometimes not result in the expected 'submit' in a FillinTheBlankMorph, if it were typed so quickly on the heels of the characters that preceded it that it was absorbed as part of typeahead"! !TextMorph methodsFor: 'editing' stamp: 'sw 8/12/2002 01:10'! acceptOnCR "Answer whether the receiver wants to accept when the Return key is hit. Generic TextMorph has no such feature, but subclasses may." ^ false! ! !TextMorphEditor methodsFor: 'typing support' stamp: 'sw 8/12/2002 01:12'! dispatchOnCharacter: char with: typeAheadStream "Carry out the action associated with this character, if any. Type-ahead is passed so some routines can flush or use it." ((char == Character cr) and: [morph acceptOnCR]) ifTrue: [sensor keyboard. "Gobble cr -- probably unnecessary." self closeTypeIn. ^ true]. ^ super dispatchOnCharacter: char with: typeAheadStream! ! !TextMorphForEditView methodsFor: 'accept/cancel' stamp: 'sw 8/12/2002 00:02'! acceptOnCR "Answer whether the receiver wants to accept when the Return key is hit" ^ acceptOnCR == true! !