Skip navigation.
 
mlRe: Question about relation between File's Owner, First Responder and controller object...
FROM : Ondra Cada
DATE : Tue Apr 12 20:32:43 2005

Mikael,

On 12.4.2005, at 6:16, Mikael Arctaedius wrote:

>> ... Normally though, the NSDocument subclass -- the document NIB's
>> File's Owner -- is the document controller.

>
> OK, I just follow a recommentation from Garfinkel&Mahoney (Building
> Cooca Applications A Step-by-Step Guide page 328) to split
> the functionality into a controller and a document class.


I've got only the old book, which pre-dates the document architecture.

Anyway, if they recommend to do this, presumably they also show *how*
to do this?

>> In the MainMenu, you'll connect the menu action to First Responder.
>> That will ensure the appropriate NSDocument subclass (of the active
>> window) would get the message, and the redirection then would ensure
>> the SystemController instance of yours--instantiated from the
>> NIB--gets the message to do the work.

>
> But the First Responder does not have the desired actions.


You can add any action (even a non-existent one :)) to the First
Responder in IB. Just doubleclick the FR, and the editor opens in the
Inspector panel.
---
Ondra Čada
OCSoftware:    <email_removed>              http://www.ocs.cz
private        <email_removed>            http://www.ocs.cz/oc