Re: NSSaveView and odd NSCFArray errors
Re: NSSaveView and odd NSCFArray errors
- Subject: Re: NSSaveView and odd NSCFArray errors
- From: Jerry Seeger <email@hidden>
- Date: Thu, 18 Sep 2003 10:54:16 -0700
On Thursday, September 18, 2003, at 09:33 AM, Adam Knight wrote:
Concerning this, I think I'm closer. It appears that the document
object is not used properly when a menu item is selected. That is,
when there's a button on the document window then all the methods talk
to the right document object, but when a menu is selected it does not
talk to the right object and, hence, I get funkyness like the below.
Key clue: it never appeared as a sheet. Always a floating window,
even though the document's window object was being passed.
So, questions:
1. What is the proper way to make a menu item talk to the frontmost
document (not key window, the document object)?
2. How bad is it to make all menu items have a firstResponder entry?
That works well to solve #1 in practice, but it seems like a hack.
It's not a hack at all. The response chain is an excellent way to get
the message to the right responder. You can add any custom actions you
need to First Responder in IB if necessary as well, and implement those
in your document controller. The right document controller will get the
message every time. That can save you a lot of work.
Jerry
_______________________________________________
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.