A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-LM.1462.mcz ==================== Summary ==================== Name: Morphic-LM.1462 Author: LM Time: 6 September 2018, 12:14:18.079447 pm UUID: e1c1e0cf-8e19-7e49-99f6-bc98b78ed007 Ancestors: Morphic-cmm.1461 Fixes a NonBooleanReceiver error that appeared when pressing backspace on a read-only text field. =============== Diff against Morphic-cmm.1461 =============== Item was changed: ----- Method: TextEditor>>backTo: (in category 'typing support') ----- backTo: startIndex "During typing, backspace to startIndex. If there already is a selection, just delete that selection. Otherwise, check if we did something else than backward-deletion and start a new command if so." + morph readOnly ifTrue: [^ false]. - morph readOnly ifTrue: [^ self]. self hasSelection ifTrue: [ "Add checkpoint in undo history." self replaceSelectionWith: self nullText. ^ true]. startIndex > self text size ifTrue: [^ false]. self selectInvisiblyFrom: startIndex to: self stopIndex-1. self isTypingIn ifTrue: [ self history current type = #backward ifFalse: [self closeTypeIn] ifTrue: [ "Accumulate all deleted characters in current undo command." self history current contentsBefore replaceFrom: 1 to: 0 with: self selection. self history current intervalBefore in: [:i | self history current intervalBefore: (startIndex to: i last)]]]. self openTypeInFor: #backward. self zapSelectionWith: self nullText. ^ false! |
I have some other changes in Morphic coming, I'll include this, too.
Thanks. On Thu, Sep 6, 2018 at 5:15 AM <[hidden email]> wrote: > > A new version of Morphic was added to project The Inbox: > http://source.squeak.org/inbox/Morphic-LM.1462.mcz > > ==================== Summary ==================== > > Name: Morphic-LM.1462 > Author: LM > Time: 6 September 2018, 12:14:18.079447 pm > UUID: e1c1e0cf-8e19-7e49-99f6-bc98b78ed007 > Ancestors: Morphic-cmm.1461 > > Fixes a NonBooleanReceiver error that appeared when pressing backspace on a read-only text field. > > =============== Diff against Morphic-cmm.1461 =============== > > Item was changed: > ----- Method: TextEditor>>backTo: (in category 'typing support') ----- > backTo: startIndex > "During typing, backspace to startIndex. If there already is a selection, just delete that selection. Otherwise, check if we did something else than backward-deletion and start a new command if so." > > + morph readOnly ifTrue: [^ false]. > - morph readOnly ifTrue: [^ self]. > > self hasSelection ifTrue: [ > "Add checkpoint in undo history." > self replaceSelectionWith: self nullText. > ^ true]. > > startIndex > self text size ifTrue: [^ false]. > > self selectInvisiblyFrom: startIndex to: self stopIndex-1. > > self isTypingIn ifTrue: [ > self history current type = #backward > ifFalse: [self closeTypeIn] > ifTrue: [ > "Accumulate all deleted characters in current undo command." > self history current contentsBefore replaceFrom: 1 to: 0 with: self selection. > self history current intervalBefore in: [:i | > self history current intervalBefore: (startIndex to: i last)]]]. > > self openTypeInFor: #backward. > self zapSelectionWith: self nullText. > > ^ false! > > |
Free forum by Nabble | Edit this page |