home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5622 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  2.4 KB

  1. Path: 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
  2. From: sksircar@phoenix.Princeton.EDU (Subrata Sircar)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Getting a PopUpList's window
  5. Message-ID: <1992Aug14.221117.18260@Princeton.EDU>
  6. Date: 14 Aug 92 22:11:17 GMT
  7. References: <1992Aug12.002320.2320@afs.com> <1992Aug14.134143.26334@sinix.UUCP>
  8. Sender: news@Princeton.EDU (USENET News System)
  9. Organization: SPAMIT
  10. Lines: 33
  11. Originator: news@nimaster
  12. Nntp-Posting-Host: phoenix.princeton.edu
  13.  
  14. dhg@sinix.UUCP (David Griffith) writes:
  15. >In article <1992Aug12.002320.2320@afs.com> greg@afs.com writes:
  16. >>You are doing an inherently problematic thing, because PopUpLists are NOT  
  17. >>controls, like TextFields and Buttons. They inherit through the Window  
  18. >>hierarchy and are actually subclasses of Menus. By definition, you cannot  
  19. >>ask a Window what Window it lives on. The Matrix lives on the PopUpList,  
  20. >>not the Window it appears to be on, so it's no help either. Even the cover  
  21. >>button is no help, because it's not directly attached to the PopUp.
  22.  
  23. So keep the button around.  (This is the reverse of my problem, which is
  24. usually how to munge with the PopUp List itself, or it's matrix).  When
  25. you create the PopUp programmatically, keep the button (perhaps in your list
  26. of things to free) as an id instance variable.  Overhead is small, since it
  27. is a pointer.
  28.  
  29. The other alternative is to create the popUp in IB, where you get a handle to
  30. the button.  Now, reference the popUp with [button target], or add a category
  31. to PopUp to return the matrix (which is what I do) and munge it directly.
  32.  
  33. >I think NeXT should implement the concept of parent/child windows to
  34. >provide a generic solution to this problem (i.e. the PopUpList window
  35. >becomes the child of the main window). There would probably be many uses
  36. >for such a feature besides PopUpLists. Also, closing/hiding the parent
  37. >window could automatically close/hide the children.
  38.  
  39. I'm not so sure about this, but I really hope PopUp list has been debugged
  40. and better integrated into 3.0; it's kind of a bastard child now.
  41.  
  42. -- 
  43. Subrata Sircar | ssircar@canon.com | Prophet & SPAMIT Charter Member
  44. Canon Information Systems and I do not speak for each other on all things.
  45. "I wish people wouldn't instantly assume that I am an idiot." (Valentine)
  46. "A restaurant is a whorehouse that does food instead of sex." (Roger Lustig)
  47.