Talking to FirstResponder
Talking to FirstResponder
- Subject: Talking to FirstResponder
- From: Colin Jackson <email@hidden>
- Date: Sat, 11 Jan 2003 23:47:49 +0000
Hi,
I'm in the middle of writing my first Cocoa app. My App is probably
one of the most complex things I have ever programmed but I am slowly
learning that Cocoa usually has a solution to all my problems - my app
is based around a text editor which could probably be made in about 30
seconds from start to finish if you rehearsed it a few times.
Anyway, so here is the problem. I need to perform actions on whatever
the FirstResponder is every-so-often. It's easy enough to attach a
button to a FirstResponder in IB but how can I call the same set of
actions from within the program?
I tried this:
[[[NSApp keyWindow] firstResponder] print];
But it doesn't work:
warning: 'NSResponder' does not respond to print
at compile time
and
*** -[NSWindow print]: selector not recognized
at runtime
By the way, the actions I actually want to perform are all the ones to
do with spell-checking.
Help would be much appreciated.
Colin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.