Xref: utzoo comp.windows.open-look:1515 alt.toolkits.xview:192 comp.windows.misc:2076 comp.windows.x:36823 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!cci632!sz From: sz@cci632.cci.com (Stephen Zehl) Newsgroups: comp.windows.open-look,alt.toolkits.xview,comp.windows.misc,comp.windows.x Subject: Help! with scrolling lists and xv_create Keywords: scrolling lists, xv_create Message-ID: <1991May24.211132.10282@cci632.cci.com> Date: 24 May 91 21:11:32 GMT Organization: Computer Consoles Incorporated Lines: 41 - I'm looking for a little help with scrolling lists under OpenWindows (XView). I'm using DevGuide to generate C code stubs of scrolling lists, I'm having trouble getting the information into the lists. Volume Seven of the XView Programming Manual gives two examples of how to hard code these choices into the code on pages 155 and 157. As shown below: xv_create(panel, PANEL_LIST, PANEL_LIST_STRINGS, "One", "Two", "Three", NULL, NULL); This is fine if you know what you want in the list ahead of time, but what if you want to read in a list of files from a directory? I figured I could just substitute a pointer to an array of strings in place of the strings themselves as shown below: static char *mylist[3] = { "One", "Two", "Three" }; xv_create(panel, PANEL_LIST, PANEL_LIST_STRINGS, *mylist, NULL, NULL); This will give me the first string in the list, but not the rest. And if I tack the NULL onto the list itself and remove it from after *mylist, I get a segmentation fault and a core in my lap. If anyone out there has worked on this, Please, Please send me some e-mail with an explaination of how you did this. I'd really appreciate it. Thanks again, Steve. CCCC CCCC IIII Stephen Zehl Internet: sz@cci.com CC CC II Computer Consoles. Inc. Usenet: uupsi!cci632!sz CC CC II Rochester, New York. or : uunet!ccicpg!cci632!sz CCCC CCCC IIII DISCLAIMER: I speak for myself, not for my employer.