Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.247.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.247 Author: mt Time: 14 October 2019, 7:34:29.224144 pm UUID: 6fad4d29-7d1b-7b4f-a5e2-13ab2368ca7b Ancestors: ToolBuilder-Morphic-mt.246 Complements Morphic-mt.1569. =============== Diff against ToolBuilder-Morphic-mt.246 =============== Item was changed: ----- Method: ListChooser>>searchText: (in category 'accessing') ----- searchText: aString searchText := aString. + listMorph listFilterSet: aString asString. - listMorph filterList: aString asString. self changed: #searchText. self changed: #canAcceptOrAdd. self changed: #acceptLabel. self changed: #buttons.! Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableMultiColumnList: (in category 'widgets required') ----- buildPluggableMultiColumnList: aSpec | widget listClass getIndex setIndex | aSpec getSelected ifNil:[ listClass := self multiColumnListClass. getIndex := aSpec getIndex. setIndex := aSpec setIndex. + ] ifNotNil: [ + listClass := self multiColumnListByItemClass. - ] ifNotNil:[self error: 'not yet'. - listClass := self listByItemClass. getIndex := aSpec getSelected. setIndex := aSpec setSelected. ]. widget := listClass on: aSpec model list: aSpec list selected: getIndex changeSelected: setIndex menu: aSpec menu keystroke: aSpec keyPress. self register: widget id: aSpec name. " widget dragItemSelector: aSpec dragItem; dropItemSelector: aSpec dropItem; wantsDropSelector: aSpec dropAccept; dragStartedSelector: aSpec dragStarted." self setListPropertiesFor: widget spec: aSpec. ^widget! Item was added: + ----- Method: MorphicToolBuilder>>multiColumnListByItemClass (in category 'widget classes') ----- + multiColumnListByItemClass + ^ PluggableMultiColumnListMorphByItem! Item was changed: PluggableListMorphPlus subclass: #PluggableListMorphByItemPlus instanceVariableNames: 'itemList' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! + !PluggableListMorphByItemPlus commentStamp: 'mt 10/13/2019 11:01' prior: 0! + Like PluggableListMorphPlus but maps #setIndexSelector and #getIndexSelector to actual items instead of indexes.! - !PluggableListMorphByItemPlus commentStamp: '<historical>' prior: 0! - Main comment stating the purpose of this class and relevant relationship to other classes. - - Possible useful expressions for doIt or printIt. - - Structure: - instVar1 type -- comment about the purpose of instVar1 - instVar2 type -- comment about the purpose of instVar2 - - Any further useful comments about the general approach of this implementation.! Item was changed: ----- Method: PluggableListMorphByItemPlus>>changeModelSelection: (in category 'model access') ----- changeModelSelection: anInteger "Change the model's selected item to be the one at the given index." - | item | setIndexSelector ifNotNil: [ + model + perform: setIndexSelector + with: (self getFullList at: anInteger ifAbsent: [nil])].! - item := (anInteger = 0 ifTrue: [nil] ifFalse: [itemList at: anInteger]). - model perform: setIndexSelector with: item]. - self update: getIndexSelector. - ! Item was changed: ----- Method: PluggableListMorphByItemPlus>>getCurrentSelectionIndex (in category 'model access') ----- getCurrentSelectionIndex "Answer the index of the current selection." + + ^ getIndexSelector + ifNil: [0] + ifNotNil: [self getFullList indexOf: (model perform: getIndexSelector)]! - | item | - getIndexSelector == nil ifTrue: [^ 0]. - item := model perform: getIndexSelector. - ^ itemList findFirst: [ :x | x = item] - ! Item was removed: - ----- Method: PluggableListMorphByItemPlus>>getList (in category 'as yet unclassified') ----- - getList - "cache the raw items in itemList" - itemList := getListSelector ifNil: [ #() ] ifNotNil: [ model perform: getListSelector ]. - ^super getList! Item was removed: - ----- Method: PluggableListMorphByItemPlus>>list: (in category 'initialization') ----- - list: arrayOfStrings - "Set the receivers items to be the given list of strings." - "Note: the instance variable 'items' holds the original list. - The instance variable 'list' is a paragraph constructed from - this list." - "NOTE: this is no longer true; list is a real list, and itemList is no longer used. And this method shouldn't be called, incidentally." - self isThisEverCalled . - itemList := arrayOfStrings. - ^ super list: arrayOfStrings! |
Free forum by Nabble | Edit this page |