ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Jan-Apr/actions-and-targets

This is actions-and-targets in view mode; [Up]


Date: Sun 20-Apr-1989 20:34:42 From: Unknown Subject: actions and targets I just discovered something rather interesting. If you have a panel that is modally run from your MyApp object, the target of any cells in the panel is set to that object by default. This leads you into mistakenly believing that you can set up actions for cells just by calling setAction:. This is not true. 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. Mark Crispin / P.O. Box 2652 / Seattle, WA 98111-2652 / (206) 842-2385 mrc@Tomobiki-Cho.CAC.Washington.EDU / MRC@WSMR-SIMTEL20.Army.Mil 450cc Rebel pilot -- a step up from 250cc's!!! kisha no kisha ga kisha de kisha-shita...tabesaserarenakerebanaranakattarashii >From: mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin)
Date: Sun 21-Apr-1989 14:34:30 From: Unknown Subject: Re: actions and targets 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 >From: feldman@umd5.umd.edu (Mark Feldman)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.