Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!socrates!ems From: ems@socrates.JPL.NASA.gov (Eric Slimko) Newsgroups: comp.windows.x.motif Subject: Accessing internal structure of List Keywords: LIST, INTERNAL STRUCTURE, WIDGET Message-ID: <1990Oct4.225724.28489@elroy.jpl.nasa.gov> Date: 4 Oct 90 22:57:24 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Reply-To: ems@socrates.jpl.nasa.gov Organization: Jet Propulsion Laboratory, NASA/Caltech Lines: 35 Nntp-Posting-Host: socrates.jpl.nasa.gov I am writing a routine that does (supposedly) some work with the internal structure of a List Widget. Unfortunately, I am having problems with accessing parts of the structure-- some turn up 0 while others are fine. Here's a small example of the routine that's giving me problems: #include #include #include #include #include #include void ListInfo(w) XmListWidget(w) { printf("Last Hightlighted Item:%d", w->list.LastHLItem); } (Yup, I do have a item highlighted before this is called) This kind of thing works with some of the values, like StartItem and visibleItemCount, but fails for others, like LastHLItem and itemCount. Mostly, I get 0, but sometimes I turn up with a random number like 163384, which leads me to believe I am not accessing the correct structure...I have written Widgets before, and this is how I accessed them in their private routines, so I don't see what gives. Please Help! Thanks in advance, -- Eric Slimko | Jet Propulsion Laboratories ems@socrates.jpl.nasa.gov | NASA/CalTech