home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17228 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  2.1 KB

  1. Path: sparky!uunet!haven.umd.edu!ames!agate!dog.ee.lbl.gov!news!nosc!crash!orbit!pnet51!chucks
  2. From: chucks@pnet51.orb.mn.org (Erik Funkenbusch)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Multiple Windows
  5. Message-ID: <8771@orbit.cts.com>
  6. Date: 11 Dec 92 10:05:03 GMT
  7. Sender: news@orbit.cts.com
  8. Organization: People-Net [pnet51], Minneapolis, MN.
  9. Lines: 32
  10.  
  11. Is there an easier way of telling which Window a Window pointer is pointing
  12. without resorting to the UserData field?
  13.  
  14. I have an application where i have several windows that open up.  Rather than
  15. calling a different IDCMP Dispatch function for each window, i used unique
  16. gadget ID's for every gadget in the program, even if they have different
  17. windows.
  18.  
  19. My problem here is that i'd rather use a program like GadToolsBox to design
  20. everything, and GadToolsBox defaults each gadget id to 0 for each new window. 
  21. Sure, i can modify the generated source, but then if i modify my GadToolsBox
  22. image and regenerate i need to make these modifications again.
  23.  
  24. I can use the STart ID field in the window data requester, however this means
  25. that i have to know how many gadgets are in the other windows, and heaven help
  26. me if i add more to a previous window..
  27.  
  28. So, my solution would be to have my IDCMP Dispatch routine know which window
  29. it's dealing with and handle the appropriate gadget based on that.
  30.  
  31. I can think of only one way to legally do this, and that's use the UserData
  32. field to point to a window number or something.  Is there an easier way?
  33.  
  34. As a side note, has anyone else noticed that GadtoolsBox 1.3 doesn't generate
  35. the proper IDCMP flags for gadgets when you start adding a lot of windows?
  36.  
  37. .-----------------------------------------------------------------------------.
  38. | UUCP: {crash tcnet petrus quest}!orbit!pnet51!chucks | Amiga, IBM, and any  |
  39. | ARPA: crash!orbit!pnet51!chucks@nosc.mil             | system you let me    |
  40. | INET: chucks@pnet51.orb.mn.org                       | get my grubby mind   |
  41. |------------------------------------------------------| into.                |
  42. | Programmer at large, employment options welcome, inquire within.            |
  43.