home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!ulowell!swlvx2!NMC.ED.RAY.COM!smiles
- From: smiles@NMC.ED.RAY.COM (Kevin Ruddy)
- Subject: Building a panel before xv_main_loop
- Message-ID: <1992Sep10.233257.14280@ferrari.nmc.ed.ray.com>
- Sender: news@ferrari.nmc.ed.ray.com (USENET News System)
- Nntp-Posting-Host: jaguar.nmc.ed.ray.com
- Organization: Equipment Division, Raytheon Company
- Date: Thu, 10 Sep 92 23:32:57 GMT
- Lines: 28
-
-
- I have a very small program that isn't working. All its supposed to do
- is read some entries from a DBM file, and put them into a PANEL_CHOICE.
- I can't do this in the xv_create call, because I can't build a list of
- arguments to pass. (If I could pass an array of strings instead, this
- wouldn't be an issue.) So, basically, I do
-
- initialize
- xv_create(PANEL_CHOICE)
- loop {
- read database
- xv_set(PANEL_CHOICE_STRING, n++, entry)
- }
- xv_main_loop
-
- The problem is that the xv_set bombs (segmentation fault). I'm guessing
- that it's because the panel isn't realized until xv_main_loop, and the
- xv_set is assuming that the panel has already been realized. How do
- other people get around this? Any suggestions? I have no idea where to
- go from here. There doesn't appear to be a PANEL_CREATE_PROC that might
- be triggered when the panel is created. If there was, I could read the
- database then and do the xv_sets.
-
- Any help anyone can offer would be very appreciated.
-
- Kevin.Ruddy@NMC.ED.RAY.COM
- --
- Kevin.Ruddy@NMC.ED.RAY.COM
-