Open easiwriter opened 4 months ago
@easiwriter, it might be because of what I highlighted earlier as an improvement that I have in my backlog. I am not sure though as to how soon I'll be able to get to it but will try to prioritize that. Are you able to provide more details about which delegate you're finding nil?
Here's the call sequence:
`
And the delegate is here along with a load of other null methods at line 141:
public extension EditorViewDelegate { func editor(_ editor: EditorView, shouldHandle key: EditorKey, modifierFlags: UIKeyModifierFlags, at range: NSRange, handled: inout Bool) { } func editor(_ editor: EditorView, didReceiveKey key: EditorKey, at range: NSRange) { } func editor(_ editor: EditorView, didReceiveFocusAt range: NSRange) { } func editor(_ editor: EditorView, didLoseFocusFrom range: NSRange) { } func editor(_ editor: EditorView, didChangeTextAt range: NSRange) { } func editor(_ editor: EditorView, didChangeSelectionAt range: NSRange, attributes: [NSAttributedString.Key: Any], contentType: EditorContent.Name) { } func editor(_ editor: EditorView, didExecuteProcessors processors: [TextProcessing], at range: NSRange) { } func editor(_ editor: EditorView, didChangeSize currentSize: CGSize, previousSize: CGSize) { } func editor(_ editor: EditorView, didTapAtLocation location: CGPoint, characterRange: NSRange?) { } func editor(_ editor: EditorView, didLayout content: NSAttributedString) { } func editor(_ editor: EditorView, willSetAttributedText attributedText: NSAttributedString, isDeferred: Bool) { } func editor(_ editor: EditorView, didSetAttributedText attributedText: NSAttributedString, isDeferred: Bool) { } func editor(_ editor: EditorView, isReady: Bool) { } func editor(_ editor: EditorView, didChangeEditable isEditable: Bool) { } func editor(_ editor: EditorView, didRenderAttachment attachment: Attachment) { } func editor(_ editor: EditorView, shouldSelectAttachmentOnBackspace attachment: Attachment) -> Bool? { return nil } func editor(_ editor: EditorView, didChangeBackgroundColor color: UIColor?, oldColor: UIColor?) { } }
UndoRedo is working OK now. But selection changes are not being notified to the delegate anymore. I traced through your code and it ends up in a null delegate method in an extension. Also tapping on any text brings up the edit menu popup. I assume these things are due to incomplete changes in your code?