Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!beguine!Paul.Quane From: Paul.Quane@samba.acs.unc.edu (Paul Quane) Newsgroups: comp.windows.x.motif Subject: Re: XmScrolledList explodes Keywords: why it does this Message-ID: <1941@beguine.UUCP> Date: 15 Dec 90 21:20:23 GMT Sender: usenet@beguine.UUCP Lines: 26 In a previous post I asked why my scrolled list went crazy after a sequence of XmListAddItemUnselected/XmListDeletePos and use of the scroll bar. Well I tracked it down to the visibleItemCount resource being corrupted somehow, going from a respectable 5 to an outrageous 30174, or thereabouts! Anyway in case anybody has the problem occur in their code the solution is to GetValues the visibleItemCount before using the above calls and then re-set it later. Thanks to the person who suggested setting the itemCount to 0 instead of using the above routines.. I haven't tried this yet but I will. I had another problem with a List Widget where I was trying to use It as a queue for displaying comms messages received. Unfortunately these messages are 2K bytes each and even though I only retained a queue of 10 items the program grew by 2k ( or more ? - XmString size of 2k characters ?) every time a message is received. As this interval is about every 2 seconds the program got verylarge indeed in no time any caused all the swap space to be used up causing HP-UX to kill off processes with abandon! Also this huge list made the application so slow as to be unusable. The solution to this problem was to have the list items be the first 20 or so characters of the message and the full text of the message is displayed in a dialog when the user clicks on the list item. I know this will still grow but not as fast, right ? And 1.1 will fix this problem when we get it, right? Paul Quane