-
Re: controlTextDidEndEditing Instance method 'controlTextDidEndEditing' nearly matches optional requirement 'control(_:textShouldBeginEditin
eskimo Sep 11, 2016 8:53 AM (in response to alex_kac)Urgh, informal protocols.
Can you post some more context for this? I tried this out in a simple macOS test project and didn’t get the warning.
import Cocoa class O : NSObject, NSControlTextEditingDelegate { override func controlTextDidBeginEditing(_ obj: Notification) { } }
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: controlTextDidEndEditing Instance method 'controlTextDidEndEditing' nearly matches optional requirement 'control(_:textShouldBeginEditin
alex_kac Sep 12, 2016 8:42 AM (in response to eskimo)Hi Quinn.
You are testing DidBeginEditing and I'm using DidEndEditing. Shouldn't make much of a difference, but here's the interesting thing. If I just have
override open func controlTextDidEndEditing(_ obj: Notification) { ...code goes here... }
by itself - I get the warning. If I add an empty:
override open func controlTextDidBeginEditing( _ obj: Notification) { } override open func controlTextDidEndEditing(_ obj: Notification) { ...code goes here... }
No warning…
Context - its a Swift-based private framework for my app.
open class FSRichTextEditorController: NSViewController, FSRichTextEditor, NSMenuDelegate, NSComboBoxDelegate, NSTextViewDelegate, NSTextStorageDelegate, QLPreviewPanelDataSource, NSPopoverDelegate, NSControlTextEditingDelegate {
-
Re: controlTextDidEndEditing Instance method 'controlTextDidEndEditing' nearly matches optional requirement 'control(_:textShouldBeginEditin
eskimo Sep 13, 2016 2:25 AM (in response to alex_kac)Well that’s odd. You should definitely file a bug about this. Please post your bug number, just for the record.
Are there any drawbacks with implementing both methods? If not, that seems like your workaround.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: controlTextDidEndEditing Instance method 'controlTextDidEndEditing' nearly matches optional requirement 'control(_:textShouldBeginEditin
alex_kac Sep 13, 2016 9:00 AM (in response to eskimo)Its a decent workaround. I'll file a bug shortly. I've got quite a few already in RADAR
-
Re: controlTextDidEndEditing Instance method 'controlTextDidEndEditing' nearly matches optional requirement 'control(_:textShouldBeginEditin
eskimo Sep 14, 2016 2:57 AM (in response to alex_kac)I've got quite a few already in RADAR
Betcha I’ve got more (-:
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
-
-
-