home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11538 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  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 with GadTools stuff...
  5. Message-ID: <heinz.02lq@edohwg.UUCP>
  6. Date: 22 Jul 92 19:08:14 GMT
  7. References: <14g6bbINN81o@darkstar.UCSC.EDU>
  8. Organization: Edotronik GmbH
  9. Lines: 44
  10.  
  11. In article <14g6bbINN81o@darkstar.UCSC.EDU> smythe@cats.ucsc.edu (Brian Matthew Aljian) writes:
  12. >
  13. >I'm having problems getting text to show up in Text-Entry and Text-Display
  14. >gadgets.  Specifically, I'm having problems manipulating and setting the
  15. >pointers that point to the text I want to put in the gadgets.    Note that
  16. >I'm using the GadToolsLibrary.
  17. >
  18. >I have in an include file:
  19. >
  20. >STRPTR Item1;
  21. >STRPTR Item2;
  22. >
  23. >struct TagItem Item1_Tags[] =
  24. >{
  25. >    {GTST_String,        &Item1},
  26. >    {TAG_DONE,        NULL},
  27. >};
  28. >
  29. >struct TagItem Item2_Tags[] =
  30. >{
  31. >    {GTTX_Text,        &Item2},
  32. >    {TAG_DONE,        NULL},
  33. >};
  34. >
  35. >Then in main() I have...
  36. >
  37. >   Item1 = "sample1";
  38. >   Item2 = "sample2";
  39.  
  40. You need to leave out the "&" chars. You have to specify a pointer to the
  41. text you want to display, not a pointer to the pointer to the text.
  42.  
  43. Hope that helps.
  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.