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

  1. Path: sparky!uunet!ogicse!uwm.edu!rpi!psinntp!psinntp!afs!greg
  2. From: greg@afs.com (Gregory H. Anderson)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Getting a PopUpList's window
  5. Message-ID: <1992Aug19.010018.767@afs.com>
  6. Date: 19 Aug 92 01:00:18 GMT
  7. Article-I.D.: afs.1992Aug19.010018.767
  8. Sender: greg@afs.com
  9. Reply-To: greg@afs.com
  10. Lines: 40
  11.  
  12. In article <Bt05Mv.Mt8@ux1.cso.uiuc.edu> jeffo@ux1.cso.uiuc.edu (J.B.  
  13. Nicholson-Owens) writes:
  14. > One small PopUp problem I haven't seen addressed is having a lot of
  15. > entries in a PopUp or PopDown (whatever those downward expanding PopUp
  16. > menus are called).  There needs to be something that is able to,
  17. > perhaps, scroll the choices up and down the way Mac pull-down menus do
  18. > when the menu is too long to display on the screen.
  19. > Has anything been done in 3.0 to handle this situation?
  20. > I wish that merely using a scrollView were a suitable replacement for
  21. > such problems, but the ability of the PopUp to give an infinite number
  22. > of choices as well as show the chosen one in a very small space and
  23. > almost instantly is *very* handy.  I would hate to have to revert to a
  24. > button bringing up a panel that had a scrollView in it.  That would
  25. > seem so cumbersome to me as a user.
  26.  
  27. We actually wrote a subclass of TextField called LookupField which solves  
  28. this problem. The LookupField owns a ButtonCell which displays its label  
  29. (non-bordered, so it appears to be a plain old static TextField). When you  
  30. click on the ButtonCell region, a LookupPanel pops up with all acceptable  
  31. values contained in a scrolling Matrix. Just like a PopUpList, this panel  
  32. runs modal until you make a selection or cancel the operation. Our users  
  33. don't find it cumbersome, perhaps because it is well integrated with the  
  34. TextField: The same panel pops up automatically to validate data entry  
  35. directly into the field.
  36.  
  37. The lookup table values are stored in a group of flat files and attached  
  38. to the LookupField by name. That means you don't need to access the NIB  
  39. file to change the contents of the table, as you would with PopUpLists. It  
  40. also allows lookup tables to be built in-memory on the fly, for non-static  
  41. data. (Yes, I know you can do both of these things with programmatic  
  42. PopUps, but it's a lot more work.) A very convenient and intuitive  
  43. alternative to PopUpLists, which we no longer use.
  44.  
  45. --
  46. Gregory H. Anderson          | "We're very tolerant around here,
  47. Benevolent Dictator-for-Life |  being only amateurs ourselves."
  48. Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
  49. greg@afs.com  (Nextmail OK)  | 
  50.