[Pkg] The Trunk: Morphic-mt.1859.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 27 10:53:24 UTC 2022


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1859.mcz

==================== Summary ====================

Name: Morphic-mt.1859
Author: mt
Time: 27 January 2022, 11:53:19.177541 am
UUID: 2c66cdaf-678a-e041-a518-ee6beef9824f
Ancestors: Morphic-mt.1858

Fixes an issue where the mini editor on a workspace's window title did not pass on the edits to the model.

Note that while this "fix" does not look good to me, it illustrates a fair use of Squeak's meta-object protocol. In a later revision, we should think about using specific string morphs for titles in pluggable windows. And add a #setLabelSelector to tool-builder specs etc. to get rid of the #asSimpleSetter assumption.

=============== Diff against Morphic-mt.1858 ===============

Item was changed:
  ----- Method: StringMorph>>acceptContents (in category 'editing') -----
  acceptContents
+ 	"The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation updates the model's known window title for pluggable windows."
+ 
+ 	self containingWindow ifNotNil: [:wnd |
+ 		(wnd respondsTo: #getLabelSelector) ifTrue: [
+ 			wnd getLabelSelector ifNotNil: [:selector |
+ 				| mutator |
+ 				mutator := selector asSimpleSetter.
+ 				(wnd model respondsTo: mutator) ifTrue: [
+ 					wnd model perform: mutator with: self contents]]]]!
- 	"The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation does nothing."
- !



More information about the Packages mailing list