wxGTK wxListBox sorted loose client data.

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
eg0master
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Feb 19, 2007 7:57 am
Location: Stockhom, Sweden
Contact:

wxGTK wxListBox sorted loose client data.

Post by eg0master »

I use wxGTK 2.8 (using wxGTK 2.4 it works fine however) and have a wxListBox with sorted data. I use SetClientData and GetClientData to store data I need for each element.
If I do:

Code: Select all

listbox.Append('A', (void*)1);
listbox.Append('B', (void*)2);
listbox.Append('C', (void*)3);
I can get the correct data using GetClientData. If I howver do this (remeber that the listbox is sorted):

Code: Select all

listbox.Append('C', (void*)3);
listbox.Append('A', (void*)1);
listbox.Append('B', (void*)2);
The GetClientData returns NULL for some valid item id's and sometimes the wrong data.

I suspect the wxControlWithItems implementention does not support sorting correctly. Any suggestions (expect making a bug-report)?
User avatar
Ryan Norton
Moderator
Moderator
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Post by Ryan Norton »

I'd try CVS as I think this was fixed very recently by Robert (the main wxGTK guy).

If that still doesn't work then I'd definately file a bug report :D.
[Mostly retired moderator, still check in to clean up some stuff]
Post Reply