2 Replies
      Latest reply on Mar 12, 2019 11:39 PM by Claude31
      Claude31 Level 8 Level 8 (5,735 points)

        I have textFields in this OSX App.


        I want to perform some test when editing ends.


        used to use controlTextDidChange or controlTextDidEndEditing by conforming to NSTextFieldDelegate for the class and setting the delegate to file's owner.


        That works well, but I noticed those are deprecated.


        So I try to use func textDidEndEditing(_ notification: Notification) instead.

        I never can get it called.

        I tried to conform the class to NSControlTextEditingDelegate, without effect.


        After reading some blogs as  h ttp://thegreyblog.blogspot.com/2014/06/  , I suspected the problem was how I set the delegate. But could not find how to change.

        I looked at Apple's doc, which is, unfortunately as usual, extremely limited. It states old methods are deprecated but do not hint at how to use new ones.


        Am I missing something obvious ?