> The File Open (for instance) menu item is already assigned, it sends
> openDocument: to FirstResponder. I can see it right there in the
> bindings, that menu item is already set up to call something.

Yes. But what is the first responder?

It is the user interface item which has focus. In many cases this will be a
control such as a text field, which does not respond to openDocument:, and
will pass it up the chain to the next responder an so on, until typically it
reaches the window, which does not respond either, but will give its
delegate a chance to respond, and if that doesn't handle it, it will go up
the application which will give its delegate a chance to handle it.

So the immediate answer to your question is that you need an instance of a
class that responds to openDocument: either a) assigned to be the
application delegate or b) assigned to be file's owner (set up in the nib by
setting the class of file's owner, and setting the file's owner to be the
window delegate).

Quincey gave you the outline already of the longer-view learning curve in
understanding the rest of how things fit together.

-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to