Binding the textDidChange event on a NSTextField to a MacRuby delegate
Posted
by kolrie
on Stack Overflow
See other posts from Stack Overflow
or by kolrie
Published on 2010-03-13T02:15:01Z
Indexed on
2010/03/13
2:17 UTC
Read the original article
Hit count: 504
I have a NSTextField within a Window and I created a very simple MacRuby delegate:
class ServerInputDelegate
attr_accessor :parent
def textDidChange(notification)
NSLog notification.inspect
parent.filter
end
end
And I have tried setting the control's delegate:
I have tried setting the Window and every other object I could think of to this delegate. I have also tried setting it to other delegates (application for instance) and events like applicationDidFinishLaunching are being properly triggered.
Is there any trick I am missing in order for this event to be triggered every time the contents of this NSTextField changes?
© Stack Overflow or respective owner