"Filed out from Dolphin Smalltalk 2000 release 4.01"! ChoicePresenter subclass: #ChoiceTextPresenter instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' classInstanceVariableNames: ''! ChoiceTextPresenter comment: 'CJD 5-7-2001 This Presenter will support ComboBoxes that can have text values that do not exist in their list part.'! ChoiceTextPresenter guid: (GUID fromString: '{9D59FAFB-A585-440D-9C92-9F9703A8CA39}')! !ChoiceTextPresenter categoriesForClass!Unclassified! ! !ChoiceTextPresenter methodsFor! createSchematicWiring "CJD 5-7-2001 Add the focusLost event, this is not a great event to use, but I did not see anything better that was available in the base system." super createSchematicWiring. self when: #focusLost send: #updateFromEditView to: self. ! updateChoice "Private - The value has been changed in the receiver's model. Transfer the value to the list view's selection. CJD 5-7-2001 Modified to avoid trying to select text if it is not in the list ." | val | val := self value. (val notNil and: [self view list includes: val]) ifFalse: [^nil]. ^super updateChoice. ! updateFromEditView "CJD 5-7-2001 Update the value based on the text value." self value: self view text. ! ! !ChoiceTextPresenter categoriesFor: #createSchematicWiring!*-unclassified!public! ! !ChoiceTextPresenter categoriesFor: #updateChoice!*-unclassified!private! ! !ChoiceTextPresenter categoriesFor: #updateFromEditView!*-unclassified!public! !