Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.908.mcz ==================== Summary ==================== Name: Tools-mt.908 Author: mt Time: 14 October 2019, 7:05:46.803144 pm UUID: e7c21796-aca7-3e4d-9f4d-121d0f305d10 Ancestors: Tools-mt.907 Fixes an update bug in the system browsers' message category selection. =============== Diff against Tools-mt.907 =============== Item was changed: ----- Method: Browser>>defineMessageFrom:notifying: (in category 'message functions') ----- defineMessageFrom: aString notifying: aController "Compile the expressions in aString. Notify aController if a syntax error occurs. Install the compiled method in the selected class classified under the currently selected message category name. Answer the selector obtained if compilation succeeds, nil otherwise." | selectedMessageName selector category oldMessageList selectedClassOrMetaClass | selectedMessageName := self selectedMessageName. oldMessageList := self messageList. selectedClassOrMetaClass := self selectedClassOrMetaClass. contents := nil. selector := (selectedClassOrMetaClass newParser parseSelector: aString). (self metaClassIndicated and: [(selectedClassOrMetaClass includesSelector: selector) not and: [Metaclass isScarySelector: selector]]) ifTrue: ["A frist-time definition overlaps the protocol of Metaclasses" (self confirm: ((selector , ' is used in the existing class system. Overriding it could cause serious problems. Is this really what you want to do?') asText makeBoldFrom: 1 to: selector size)) ifFalse: [^nil]]. category := selectedMessageName ifNil: [ self selectedMessageCategoryName ] ifNotNil: [ (selectedClassOrMetaClass >> selectedMessageName) methodReference ifNotNil: [ : ref | ref category ]]. selector := selectedClassOrMetaClass compile: aString classified: category notifying: aController. selector == nil ifTrue: [^ nil]. contents := aString copy. + + self changed: #messageCategoryList. "Because the 'as yet unclassified' might just appear." self changed: #messageList. "Because we have code-dependent list formatting by now such as #isDeprecated." + selector ~~ selectedMessageName ifTrue: [category = ClassOrganizer nullCategory ifTrue: [self changed: #classSelectionChanged. self changed: #classList. self messageCategoryListIndex: 1]. self setClassOrganizer. "In case organization not cached" (oldMessageList includes: selector) ifFalse: [self changed: #messageList]. self messageListIndex: (self messageList indexOf: selector)]. ^ selector! Item was changed: ----- Method: Browser>>selectMessageCategoryNamed: (in category 'message category list') ----- selectMessageCategoryNamed: aSymbol "Given aSymbol, select the category with that name. Do nothing if aSymbol doesn't exist." - selectedMessageCategoryName := aSymbol. + selectedMessageCategoryName := aSymbol. selectedMessageName := nil. + self changed: #messageCategorySelectionChanged. self changed: #messageCategoryListIndex. "update my selection" self changed: #messageList. + self changed: #messageListIndex. + self editSelection: (aSymbol notNil ifTrue: [#newMessage] ifFalse: [self hasClassSelected ifTrue: [#editClass] ifFalse: [#newClass]]). contents := nil. self contentsChanged.! |
Free forum by Nabble | Edit this page |