Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!labrea!polya!ali From: ali@polya.Stanford.EDU (Ali T. Ozer) Newsgroups: comp.sys.next Subject: Re: actions and targets Message-ID: <8665@polya.Stanford.EDU> Date: 21 Apr 89 14:34:30 GMT References: <1674@blake.acs.washington.edu> Sender: Ali T. Ozer Reply-To: aozer@NeXT.com (Ali Ozer) Distribution: usa Organization: . Lines: 22 In article <1674@blake.acs.washington.edu> Mark Crispin writes: > ... . It turns out that if you fire up a panel from some >other object (even modally) the target is set to nil and nothing will >happen. > >I don't see this behavior documented anywhere. If the target of an object is nil, then the action is sent to the first responder. This is how you can get document-specific menu commands such as cut, copy, paste, save, save as, etc to send their actions to the active window --- just set their targets to nil, and the commands will go to the first responder chain, which starts off with the first responder of the current window. (This will usually be your document object; a subclass of view or whatever it is...) You mentioned that the target was getting set to the MyApp object when the panel was run modally; you might want to check to see if the target is getting set explicitly (which shouldn't be the case) or if you are just seeing first-responder behaviour. Ali Ozer, NeXT Developer Support aozer@NeXT.com