Looks like I won't be either.  Somebody here made the
suggestion that after inserting the new item and deleting
the old item that I just force the selection of the item I
want and get on to my other tasks.  Oh well....

Dave Williss

----- Original Message ----- 
From: "Danny Backx" <[EMAIL PROTECTED]>
To: "Dave Williss" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 10:37 AM
Subject: Re: [Lesstif-discuss] Error in XmList


> I won't be working on it today.
>
> Danny
>
> On Wed, 2004-08-25 at 16:13, Dave Williss wrote:
> > Unless somebody is already working on the rest of
> > this problem, I should have time (I hope) to look at it
> > myself tomorrow.
> >
> > -- Dave Williss
> >
> > ----- Original Message ----- 
> > From: "Dave Williss" <[EMAIL PROTECTED]>
> > To: "Danny Backx" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, August 23, 2004 10:01 AM
> > Subject: Re: [Lesstif-discuss] Error in XmList
> >
> >
> > > It works better.
> > >
> > > After the Insert/Delete, nothing is selected and retrieving the
> > > list of selected items correctly reports the same.
> > >
> > > However...
> > >
> > > Checking a previous version of our software which used
> > > Motif, I see that after the Insert/Add operation, the newly
> > > added item became selected when deleting the selected
> > > item.
> > >
> > > This is consistent with the comment about a quirk of Motif
> > > in _XmListDeletePos, however, it's not getting into that bit
> > > of code because position (2) does not == List_LastHLItem(w)
> > > (which is still 1)  So it looks like Insert needs to adjust
> > > LastHLItem.
> > >
> > > Fixing this would at least visually make it the same as
> > > Motif.  I don't know if Motif issues callbacks telling the
> > > program about the change in selection.  One would think
> > > that logically it should.
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Danny Backx" <[EMAIL PROTECTED]>
> > > To: "Martin Simmons" <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>; "LessTif Mailing List"
> > > <[EMAIL PROTECTED]>
> > > Sent: Sunday, August 22, 2004 3:39 AM
> > > Subject: Re: [Lesstif-discuss] Error in XmList
> > >
> > >
> > > > I expect the problem described in Dave's message to be fixed now.
> > > >
> > > > Dave, can you verify ?
> > > >
> > > > Danny
> > > >
> > > > On Fri, 2004-08-20 at 19:11, Martin Simmons wrote:
> > > > > >>>>> On Fri, 20 Aug 2004 10:56:16 -0500, "Dave Williss"
> > > <[EMAIL PROTECTED]> said:
> > > > >
> > > > >   Dave> ----- Original Message ----- 
> > > > >   Dave> From: "Martin Simmons" <[EMAIL PROTECTED]>
> > > > >   Dave> To: <[EMAIL PROTECTED]>
> > > > >   Dave> Cc: <[EMAIL PROTECTED]>
> > > > >   Dave> Sent: Friday, August 20, 2004 4:39 AM
> > > > >   Dave> Subject: Re: [Lesstif-discuss] Error in XmList
> > > > >
> > > > >
> > > > >   >> >>>>> On Thu, 19 Aug 2004 16:57:07 -0500, "Dave Williss"
> > > > >   Dave> <[EMAIL PROTECTED]> said:
> > > > >   >>
> > > > >   Dave> There is an error in XmList...
> > > > >   >>
> > > > >   Dave> Starting condition: You have a list with one item and it's
> > > > >   Dave> selected.
> > > > >   Dave> Call XmListAddItemUnselected() to add another item before
it.
> > > > >   Dave> Then XmListDeletePos() to delete the old item.
> > > > >   >>
> > > > >   Dave> Problem: When adding the new item, it does not adjust the
> > > > >   Dave> List_SelectedIndices, so the list still thinks item 1 (the
> > first
> > > > >   Dave> one) is highlighted when actually it's item 2.
> > > > >   >>
> > > > >   >> Look like this could be related to bug # 916711
> > > > >   >>
> > > > >   >>
> > > > >   Dave>
> > >
> >
http://sourceforge.net/tracker/index.php?func=detail&aid=916711&group_id=8596&atid=108596
> > > > >   >>
> > > > >
> > > > >   Dave> Could be related, but this one is more nasty.  When you
add an
> > > item and then
> > > > >   Dave> delete the selected item, we're OK with ending up with
nothing
> > > selected.
> > > > >   Dave> What's nasty here is that even though nothing is selected,
> > when
> > > you call
> > > > >   Dave> XmListGetSelectedPos, it still says that there's one item
> > > selected and
> > > > >   Dave> returns a list of one random number (unitialized garbage
from
> > > the malloc
> > > > >   Dave> that was never filled in - if built for debugging, I think
it
> > > has the value
> > > > >   Dave> of 0xbaadf00d).  We then try to use this item to index
into an
> > > array of
> > > > >   Dave> stuff and KA BOOM!
> > > > >
> > > > >   Dave> A solution to this specific problem is pretty simple.  In
> > > > >   Dave> XmListGetSelectedPos, we add selected items to the return
list
> > > using j as an
> > > > >   Dave> array index.  When we're done, j is the real number of
> > selected
> > > items and
> > > > >   Dave> that's what it should return for the count.
> > > > >   Dave> That would solve this problem but hide the real problem
which
> > is
> > > that
> > > > >   Dave> something isn't keeping track of the number of selected
items
> > > correctly in
> > > > >   Dave> the first place.
> > > > >
> > > > > Right.  I think the underlying bug is that changing the items
should
> > > retain
> > > > > the selected *items*, not the selected *indices*.  If it did that
then
> > > adding
> > > > > an item would adjust the selected indices from { 1 } to { 2 } and
> > > deleting
> > > > > item 2 would adjust the selected indices to nothing.
> > > > >
> > > > > I think that's what the Motif spec requires (e.g. the doc for the
> > > > > XmNselectedItems resource mentions it being updated in certain
cases).
> > > > >
> > > > > __Martin
> > > > -- 
> > > > Danny Backx - danny.backx-at-planetinternet.be
> > http://up.to/danny.backx
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank
Media
> > > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> > > > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> > > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> > > > _______________________________________________
> > > > Lesstif-discuss mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/lesstif-discuss
> > > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> > > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> > > _______________________________________________
> > > Lesstif-discuss mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/lesstif-discuss
> > >
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> > _______________________________________________
> > Lesstif-discuss mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/lesstif-discuss
> -- 
> Danny Backx - danny.backx-at-planetinternet.be    http://up.to/danny.backx
>



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Lesstif-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lesstif-discuss

Reply via email to