Controller knowing about an event
Controller knowing about an event
- Subject: Controller knowing about an event
- From: Matt Ronge <email@hidden>
- Date: Sun, 25 Nov 2001 22:18:21 -0600
Hi,
The Cocoa newbie is back :)
I'm trying to create extremely simple apps and getting confused...for
example I tried to make a window with 2 text fields, when one is update the
other is updated with the same text.
I have a controller for my window and was thinking, how do I let the
controller know about what is going on?
My 2 ideas:
* Subclass NSTextField and override the method that is called when the text
is changed and then have an outlet to the controller that let's it know
about the event so it can update the other text field?
* Or would it be better to setup the controller in the NSNotificationCenter
so that it receives news of the event that way?
Am I on the right track? Which is the prefered method? Do both work?
--
Matt Ronge
President
Monkeybread Software
http://www.monkeybreadsoftware.com