Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.2130.mcz
==================== Summary ====================
Name: Morphic-ct.2130 Author: ct Time: 11 September 2023, 6:18:59.713063 pm UUID: 3f9268df-f04d-4d4c-bfee-7651b41c1443 Ancestors: Morphic-mt.2122
Avoids installing a new editor in TextMorph when receiving #textStyle:. Regression from Morphic-ct.2060.
An editor is not expected before the TextMorph has been added to a world/owner. For instance, #fillsOwner: before #openInWorld was previously broken, and thus the BannerMorph required for Objectland.
Please review. I'm not entirely sure whether I identified the correct invariant or whether TextContainer>>#bounds should instead check for a nil owner. Do BannerMorph example openInWorld to reproduce.
=============== Diff against Morphic-mt.2122 ===============
Item was changed: ----- Method: TextMorph>>textStyle: (in category 'accessing') ----- textStyle: aTextStyle "Change the receiver's set of fonts to aTextStyle. You can access those fonts via the TextFontChange text attribute. If you want to enfore a specific font face or point size, use #font: instead. NOTE THAT you must provide either a freshly created instance of TextStyle or a copy of an existing one. NEVER use, for example, TextStyle class >> #default directly. Also see senders and implementors of #asNewTextStyle."
| previousSelection | textStyle := aTextStyle. + previousSelection := editor ifNotNil: [editor selectionInterval]. - previousSelection := self selectionInterval. self releaseParagraph; changed. previousSelection ifNotNil: [self selectionInterval: previousSelection].!
Hmm... I thought the only carry-over of text selection is supported and handled when a PluggableTextMorph is around? Vanilla TextMorph instances have no good support of keeping track of those text selections (and editors). So ... maybe this change is a thing for TextMorphForEditView? Hmmm...
Best, Marcel
Am 13.09.2023 17:42:18 schrieb commits@source.squeak.org commits@source.squeak.org: Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.2130.mcz
==================== Summary ====================
Name: Morphic-ct.2130 Author: ct Time: 11 September 2023, 6:18:59.713063 pm UUID: 3f9268df-f04d-4d4c-bfee-7651b41c1443 Ancestors: Morphic-mt.2122
Avoids installing a new editor in TextMorph when receiving #textStyle:. Regression from Morphic-ct.2060.
An editor is not expected before the TextMorph has been added to a world/owner. For instance, #fillsOwner: before #openInWorld was previously broken, and thus the BannerMorph required for Objectland.
Please review. I'm not entirely sure whether I identified the correct invariant or whether TextContainer>>#bounds should instead check for a nil owner. Do BannerMorph example openInWorld to reproduce.
=============== Diff against Morphic-mt.2122 ===============
Item was changed: ----- Method: TextMorph>>textStyle: (in category 'accessing') ----- textStyle: aTextStyle "Change the receiver's set of fonts to aTextStyle. You can access those fonts via the TextFontChange text attribute. If you want to enfore a specific font face or point size, use #font: instead. NOTE THAT you must provide either a freshly created instance of TextStyle or a copy of an existing one. NEVER use, for example, TextStyle class >> #default directly. Also see senders and implementors of #asNewTextStyle."
| previousSelection | textStyle := aTextStyle. + previousSelection := editor ifNotNil: [editor selectionInterval]. - previousSelection := self selectionInterval. self releaseParagraph; changed. previousSelection ifNotNil: [self selectionInterval: previousSelection].!
Hi Marcel,
thanks for the feedback. Very weird ... I can no longer reproduce this issue in any of my (new and old) images, even though I am sure I have reproduced it before uploading this version. But I do remember that it was an issue with simple TextMorph, not PluggableTextMorph. Anyway, due to lack of a reproduction case, I am going to move this to treated. Sorry for the noise.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-09-13T18:04:29+02:00, marcel.taeumel@hpi.de wrote:
Hmm... I thought the only carry-over of text selection is supported and handled when a PluggableTextMorph is around? Vanilla TextMorph instances have no good support of keeping track of those text selections (and editors). So ... maybe this change is a thing for TextMorphForEditView? Hmmm...
Best, Marcel
Am 13.09.2023 17:42:18 schrieb commits(a)source.squeak.org <commits(a)source.squeak.org>: Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.2130.mcz
==================== Summary ====================
Name: Morphic-ct.2130 Author: ct Time: 11 September 2023, 6:18:59.713063 pm UUID: 3f9268df-f04d-4d4c-bfee-7651b41c1443 Ancestors: Morphic-mt.2122
Avoids installing a new editor in TextMorph when receiving #textStyle:. Regression from Morphic-ct.2060.
An editor is not expected before the TextMorph has been added to a world/owner. For instance, #fillsOwner: before #openInWorld was previously broken, and thus the BannerMorph required for Objectland.
Please review. I'm not entirely sure whether I identified the correct invariant or whether TextContainer>>#bounds should instead check for a nil owner. Do BannerMorph example openInWorld to reproduce.
=============== Diff against Morphic-mt.2122 ===============
Item was changed: ----- Method: TextMorph>>textStyle: (in category 'accessing') ----- textStyle: aTextStyle "Change the receiver's set of fonts to aTextStyle. You can access those fonts via the TextFontChange text attribute. If you want to enfore a specific font face or point size, use #font: instead. NOTE THAT you must provide either a freshly created instance of TextStyle or a copy of an existing one. NEVER use, for example, TextStyle class >> #default directly. Also see senders and implementors of #asNewTextStyle."
| previousSelection | textStyle := aTextStyle.
- previousSelection := editor ifNotNil: [editor selectionInterval].
- previousSelection := self selectionInterval.
self releaseParagraph; changed. previousSelection ifNotNil: [self selectionInterval: previousSelection].!
squeak-dev@lists.squeakfoundation.org