Article View: comp.sys.next.programmer
Article #1154Re: Getting a PopUpList's window
From: Subrata Sircar
Date: Fri, 14 Aug 1992 22:11
Date: Fri, 14 Aug 1992 22:11
33 lines
2541 bytes
2541 bytes
dhg@sinix.UUCP (David Griffith) writes: >In article <1992Aug12.002320.2320@afs.com> greg@afs.com writes: >>You are doing an inherently problematic thing, because PopUpLists are NOT >>controls, like TextFields and Buttons. They inherit through the Window >>hierarchy and are actually subclasses of Menus. By definition, you cannot >>ask a Window what Window it lives on. The Matrix lives on the PopUpList, >>not the Window it appears to be on, so it's no help either. Even the cover >>button is no help, because it's not directly attached to the PopUp. So keep the button around. (This is the reverse of my problem, which is usually how to munge with the PopUp List itself, or it's matrix). When you create the PopUp programmatically, keep the button (perhaps in your list of things to free) as an id instance variable. Overhead is small, since it is a pointer. The other alternative is to create the popUp in IB, where you get a handle to the button. Now, reference the popUp with [button target], or add a category to PopUp to return the matrix (which is what I do) and munge it directly. >I think NeXT should implement the concept of parent/child windows to >provide a generic solution to this problem (i.e. the PopUpList window >becomes the child of the main window). There would probably be many uses >for such a feature besides PopUpLists. Also, closing/hiding the parent >window could automatically close/hide the children. I'm not so sure about this, but I really hope PopUp list has been debugged and better integrated into 3.0; it's kind of a bastard child now. -- Subrata Sircar | ssircar@canon.com | Prophet & SPAMIT Charter Member Canon Information Systems and I do not speak for each other on all things. "I wish people wouldn't instantly assume that I am an idiot." (Valentine) "A restaurant is a whorehouse that does food instead of sex." (Roger Lustig)
Technical Details
Message-ID:
<1992Aug14.221117.18260@Princeton.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!swrinde!mips!darwin.sura.net!jvnc.net!princeton!phoenix.Princeton.EDU!sksircarReferences:
<1992Aug12.002320.2320@afs.com> <1992Aug14.134143.26334@sinix.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!swrinde!mips!darwin.sura.net!jvnc.net!princeton!phoenix.Princeton.EDU!sksircar From: sksircar@phoenix.Princeton.EDU (Subrata Sircar) Newsgroups: comp.sys.next.programmer Subject: Re: Getting a PopUpList's window Message-ID: <1992Aug14.221117.18260@Princeton.EDU> Date: 14 Aug 92 22:11:17 GMT References: <1992Aug12.002320.2320@afs.com> <1992Aug14.134143.26334@sinix.UUCP> Sender: news@Princeton.EDU (USENET News System) Organization: SPAMIT Lines: 33 Originator: news@nimaster Nntp-Posting-Host: phoenix.princeton.edu