Re: virtual list control
Hi Jeremy,
I don't know if you continued working on this, but I forked wxHaskell on GitHub and tried to implement it myself: https://github.com/FabianBinz/wxHaskell
For testing purposes, I only implemented the OnGetItemText and SetItemCount method and it seems to work.
To implement the "virtual" list control, I defined a new class wxVirtualListCtrl in wxc:
https://github.com/FabianBinz/wxHaskell/blob/master/wxc/src/include/virtuallistctrl_impl.h
Since it needs to invoke a callback function, I created the typedef OnGetItemTextCallback. To make wxdirect accept this new type, I extended the parser (patomtype) in ParseC.hs. This solution is very ad-hoc and I think because wxc is supposed to be a language agnostic C wrapper, we should maybe add another macro to wcx_types.hs (something like TCallback), which is then recognized by wxdirect.
So, while this all works pretty well, there is unfortunately a memory leak in Graphics.UI.WXCore.VirtualListCtrl, because of my use of newCString. At the moment I don't know how to fix it and would be glad if someone could give me some advice.
Regards,
Fabian
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
RSS Feed