Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Regular Contributor
Q-T
Posts: 69
Registered: ‎12-02-2011
My Carrier: none

ListView::selectionItems() does not return the proper number of items

I have ListView which uses a LitItemProvider that creates items which are derrived from CustomControl and ListItemListener.

 

When I have no items selected ListView::selectionItems() returns 0 as expected, but when i have one or more items selected it returns bogus values. For instance I only have two items in the list and when they are both selected it returns 4. 

 

Is this a known bug with ListView::selectionItems() or am I doing something wrong. 

 

Any feed back apprciated.  I am using the Gold Canidated by the way.

 

Please use plain text.
Developer
Dredvard
Posts: 154
Registered: ‎01-27-2012
My Carrier: Rogers

Re: ListView::selectionItems() does not return the proper number of items

Try using

 

listview.selectionList();

 

That works for me.

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Regular Contributor
Q-T
Posts: 69
Registered: ‎12-02-2011
My Carrier: none

Re: ListView::selectionItems() does not return the proper number of items

Thanks. Will give it a try.
Coming form the Qt world the MVC in cascade is another animal. Not sure it is so well thought out but maybe it just takes time to get used to.

Please use plain text.