From: Nick J. <sk...@er...> - 2002-04-22 12:34:55
|
On Sun, 21 Apr 2002, Mattia Barbon wrote: > You forgot platform & wxPerl version, so I won't give you the solution ;-p > Win32, ActivePerl 5.6.1 build 628, wxPerl 0.09 -- sorry for not including before. > I see; this: the problem is that GetItemData takes the index of the item > $list->GetItemData( $ebent->GetIndex() ), or $event->GetData() works fine > > Yes, you can use the long as an index in an array ( or in an hash ) containing > the hashrefs, though. > Ok, so I should have a hash keyed on the long and then have the value for that key be a hashref? Could you provide some sample code, please? I would really appreciate it. I'm confused that the $id in my original code is always 0. I would really appreciate some sample code here. > > How can I associate a hashref with each item in a listctrl and how I > > can access this hashref when the item is "activated"? > See above > I would appreciate it if you could produce a simple snippet of code to illustrate this (inserting an item, storing its data in a global hash keyed on the long and then retrieving). I'm still pretty new to Wx and finding it pretty difficult. - Nick |