home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11664 < prev    next >
Encoding:
Internet Message Format  |  1992-07-26  |  1.5 KB

  1. Path: sparky!uunet!cbmvax!cbmehq!cbmger!edohwg!heinz
  2. From: heinz@edohwg.UUCP (Heinz Wrobel)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Need help opening a window on a custom screen.
  5. Message-ID: <heinz.02nm@edohwg.UUCP>
  6. Date: 24 Jul 92 20:43:20 GMT
  7. References: <13g4lfINNo64@darkstar.UCSC.EDU>
  8. Organization: Edotronik GmbH
  9. Lines: 44
  10.  
  11. In article <13g4lfINNo64@darkstar.UCSC.EDU> smythe@cats.ucsc.edu (Brian Matthew Aljian) writes:
  12. >
  13. >I need help opening a window on a custom screen.  I have declared the
  14. >following (lots of stuff omitted for brevity):
  15. >
  16. >struct Screen *main_screen;
  17. >
  18. >struct Window *main_window;
  19. >
  20. >struct TagItem main_win_tags[] =
  21. >    {
  22. >    {WA_CustomScreen,    main_screen},
  23. >    ...etc...
  24. >    {TAG_DONE,        NULL},
  25. >    };
  26. >
  27. >main_window = OpenWindowTagList(NULL, main_win_tags);
  28. >
  29. >But this does not work.  My compiler complains about the first tag in the
  30. >main_win_tags[] structure.  What do I need to do to open this window on the
  31. >custom screen?
  32.  
  33. I assume it complains about a non-constant initializer.
  34.  
  35. Try a
  36.     ...
  37.     {WA_CustomScreen, NULL},
  38.     ...
  39.  
  40. and
  41.  
  42.     main_win_tags[0].ti_data = main_screen;
  43.     main_window = OpenWindowTagList...
  44.  
  45.  
  46. >   Brian M. Aljian
  47.  
  48. --
  49. Heinz Wrobel, Edotronik GmbH (ECG018)
  50. FAX +49 89 850 51 25 / TEL +49 89 850 25 20 (HOME!&VOICE, sometimes...)
  51. Path: cbmehq!cbmger!edohwg!heinz@cbmvax.commodore.com
  52. "It's good to have a mouse, it's faster if you can do without one..."
  53. "He who doesn't develop with an A2024 doesn't know about font independent
  54.  user interfaces..."
  55.