home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 825 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: informatik.uni-tuebingen.de!not-for-mail
  2. From: "Reinhard Katzmann" <Suamor@student.uni-tuebingen.de>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Problems with BOOPSI prop gadget
  5. Date: Fri, 12 Jan 1996 00:17:33 -0500
  6. Organization: InterNetNews at ZDV Uni-Tuebingen
  7. Distribution: world
  8. Message-ID: <68245089%suamor@student.uni-tuebingen.de>
  9. References: <3395.6583T1242T1959@sn.no>
  10. Reply-To: "suamor" <suamor@student.uni-tuebingen.de>
  11. NNTP-Posting-Host: gw192.informatik.uni-tuebingen.de
  12. X-NewsReader: IntuiNews 1.3a (7.9.95)
  13.  
  14. Rune Elvemo schrieb in comp.sys.amiga.programmer ueber "Problems with
  15. BOOPSI prop gadget":
  16. > I have a problem when using BOOPSI gadgets.... As far as I am concerned,
  17. > this
  18. > program should work, but when I compile it, and start it, I can't see
  19. > the
  20. > gadget..........
  21. >
  22. > What this program is SUPPOSED to do, is to open a window with a prop
  23. > gadget,
  24. > and the prop gadget will send messages to the program when it
  25. > changes....
  26. >
  27. >
  28. [includes away]
  29.  
  30. > struct Library *IntuitionBase;
  31. >
  32. > struct Window *win;
  33. > struct IntuiMessage *msg;
  34. > struct Gadget *prop;
  35.   ^^^^^^^^^^^^^
  36. Boopsi Gadgets are created using Object *
  37.  
  38. > /* prototype */
  39. > BOOL MakeProp(void);
  40. >
  41. > #define PROPGADID 1L
  42. >
  43. >      if (pub = LockPubScreen("Workbench"))
  44.                                ^^^^^^^^^^^^
  45. Workbench is default (except you are using extra PubScreens)
  46.  
  47. [...]
  48.  
  49. >                {
  50. >                NotEnough = MakeProp();
  51. >
  52. >                if (!NotEnough)
  53. >                     HandleIDCMP();
  54. >
  55. [...]
  56.  
  57. > if (prop = NewObject(NULL, "propgclass",
  58. [some GA's]
  59.  
  60. >
  61. >      PGA_Total, 50,
  62. >      PGA_Top, 1,
  63. >      PGA_Visible, 10,
  64. >
  65. >      PGA_NewLook, TRUE,
  66.        ^^^^^^^^^^^
  67. I thought this would be only used for menus!?
  68.  
  69. > /* set the window of the program to the target */
  70. >      ICA_TARGET, ICTARGET_IDCMP,
  71.  
  72. You don't need this, it is only used to communicate with other
  73. boopsi objects.
  74.  
  75. [...]
  76.  
  77. > Anyone who knows what is wrong with this?
  78.  
  79. Simple. You forgot to add the gadget: AddGadget(window,(struct Gadget *)prop,-1L)
  80.  
  81. - Reinhard Katzmann
  82.  
  83. ---
  84. E-Mail: suamor@student.uni-tuebingen.de
  85.  
  86. One day I hope to finish my RPS Pertergrin
  87. Concept for Pertergin (yet in german) avalaible on Request
  88. Current Amiga-Project: GuideTool (GUI) V1.1BETA
  89.  
  90.