QMultilineElement is difficult to use because, unlike the QEntryElement class that it extends, it does not offer a controllerAction to signal the user when the editing is finished. The intention for QMultilineElement is to provide a delegate (QuickDialogEntryElementDelegate).
This would be fine except that it currently never calls the delegate method "QEntryDidEndEditingElement". You only get a delegate call for changes, meaning every single typed character causes a callback. This is very inefficient for cases where the change of the text causes expensive processing; we only want a single call when editing is complete, not for every keystroke of entering text. It also breaks the contract of the delegate that the "didEndEditing" is never called.
This is very simple to fix. In QMultilineElement in the "selected:controller:indexPath:" method, it sets the "willDisappearCallback" for the MultilineTextViewController. This callback should include a delegate callback, like this:
QMultilineElement is difficult to use because, unlike the QEntryElement class that it extends, it does not offer a controllerAction to signal the user when the editing is finished. The intention for QMultilineElement is to provide a delegate (QuickDialogEntryElementDelegate).
This would be fine except that it currently never calls the delegate method "QEntryDidEndEditingElement". You only get a delegate call for changes, meaning every single typed character causes a callback. This is very inefficient for cases where the change of the text causes expensive processing; we only want a single call when editing is complete, not for every keystroke of entering text. It also breaks the contract of the delegate that the "didEndEditing" is never called.
This is very simple to fix. In QMultilineElement in the "selected:controller:indexPath:" method, it sets the "willDisappearCallback" for the MultilineTextViewController. This callback should include a delegate callback, like this:
I hope this is helpful, it certainly makes the QMultilineElement far more useful. I love QuickDialog, thank you for maintaining it!