home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / openloo / 3797 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.4 KB  |  40 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!ulowell!swlvx2!NMC.ED.RAY.COM!smiles
  3. From: smiles@NMC.ED.RAY.COM (Kevin Ruddy)
  4. Subject: Building a panel before xv_main_loop
  5. Message-ID: <1992Sep10.233257.14280@ferrari.nmc.ed.ray.com>
  6. Sender: news@ferrari.nmc.ed.ray.com (USENET News System)
  7. Nntp-Posting-Host: jaguar.nmc.ed.ray.com
  8. Organization: Equipment Division, Raytheon Company
  9. Date: Thu, 10 Sep 92 23:32:57 GMT
  10. Lines: 28
  11.  
  12.  
  13. I have a very small program that isn't working.  All its supposed to do
  14. is read some entries from a DBM file, and put them into a PANEL_CHOICE.
  15. I can't do this in the xv_create call, because I can't build a list of
  16. arguments to pass.  (If I could pass an array of strings instead, this
  17. wouldn't be an issue.)  So, basically, I do
  18.  
  19.     initialize
  20.     xv_create(PANEL_CHOICE)
  21.     loop {
  22.         read database
  23.         xv_set(PANEL_CHOICE_STRING, n++, entry)
  24.     }
  25.     xv_main_loop
  26.  
  27. The problem is that the xv_set bombs (segmentation fault).  I'm guessing
  28. that it's because the panel isn't realized until xv_main_loop, and the
  29. xv_set is assuming that the panel has already been realized.  How do
  30. other people get around this?  Any suggestions?  I have no idea where to
  31. go from here.  There doesn't appear to be a PANEL_CREATE_PROC that might
  32. be triggered when the panel is created.  If there was, I could read the
  33. database then and do the xv_sets.
  34.  
  35. Any help anyone can offer would be very appreciated.
  36.  
  37. Kevin.Ruddy@NMC.ED.RAY.COM
  38. -- 
  39. Kevin.Ruddy@NMC.ED.RAY.COM
  40.