[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3273.0. "change items in a list box" by TPOVC::JOHNNYHO () Wed Aug 29 1990 07:35

    I'm trying to create a list box using UIL which contains 70 default
    list items. No problem!
    
    Then in my C program, I change the contents of the list box to another
    70 list items by suing XtSetArg. No problem so far. But fatal error
    occurs whenever access to the list box, such as selecting an item in it,
    closing(unmanaged) the list box. The error is
    
    	SYSTEM-F-ACCVIO, Access violation, reason mask=00,
    			 virtual address = 00000040, pc=....
    
    But everything is fine if I create the list box with fewer items, say
    30.
    
    The VAX system is heavily loaded since other people are also developing
    RDB applications on it.
    
    Any idea why this would happen?  Thanks in advanced!
    
    Johnny 
T.RTitleUserPersonal
Name
DateLines
3273.1this works for meCSC32::B_BRADACHWed Aug 29 1990 11:046
    I have run into the same thing with several customers.  When replacing
    the list of items, be sure to set the selected items count to 0.
    
    bernie
    csc/cs
    
3273.2Thanks, Bernie.TPOVC::JOHNNYHOWed Aug 29 1990 21:151
    
3273.3list box can not greater than 64?TPOVC::JOHNNYHOMon Sep 24 1990 07:3822
    It seems the hint described in .1 does not solve problem in .0 for my
    customer. 
    
    He is using XtSetArg like this:
    
    	XtSetArg(al[0], DwtNitems, list_items)
    	XtSetArg(al[1], DwtNitemsCount, nlist)
    	XtSetArg(al[2], DwtNselectedItemsCount, 0)
    	XtSetValues(widget_array[wnum], al, 3)
    
    when nlist <= 64, no problem;
    when nlist <  64, say, 77,
    	in VMS V5.3, access to the list box will cause the application
        crashed;
        in VMS V5.2, access to the list box is o.k. but any thereafter
        graphics operation will crash the application.
    
    Can any one help?
    
    Thanks.
    
    Johnny
3273.4some clueTPOVC::JOHNNYHOMon Sep 24 1990 08:187
    I just checked with customer and got the latest status.
    
    If he replace the original array of the list items with another array,
    he'll get error. But if he replace the list items in the array one by
    one with a string variable, there will be no problem.
    
    Is this a matter of buffer or what? 
3273.5RTL::ROLLMANTue Sep 25 1990 09:4516

Just a guess - could the customer be creating the list of strings incorrectly?
It seems suspicious to me that s/he can insert the strings one at a time, but
not as one list.

Here is an example of one way to create the items:

#define NUMBERLISTBOXITEMS 4
static DwtCompString listboxitems[NUMBERLISTBOXITEMS];
static char          *itemsdata[] = {"one","two","three","four"};



    for (i = 0; i < NUMBERLISTBOXITEMS; i++)
       listboxitems[i] = DwtLatin1String(itemsdata[i]);