Hi Aur,

On 24 March 2012 22:07, Aur Saraf <sonoflilit@gmail.com> wrote:
I need a ListCtrl that I can edit and not only append to. That means
either a version of appendItem that takes an index that I've missed, a
way to get and later set the scroll-state of a ListCtrl (and then I
can just reset all items on every edit) or a way to use the
wxLC_VIRTUAL style available in C++ wxWidgets.

For your purposes, the wrapper of ListCtrl in Graphics.UI.WX.Controls is probably not going to do everything you will need it to. You will likely need to drop down to the lower level API in wxcore.

If you look in Graphics.UI.WXCore.WxcClassesAL, you will find a pretty complete binding to all of the functions in the wxWidgets C++ API. These all start with listCtrl in their names, and are pretty much exact Haskell representations of the C++ API functions. As an example, wxListCtrl::InsertItem() becomes listCtrlInsertItem in Haskell. For functions which have overloads in C++ (as this example does), you will find that there are several variants of listCtrlInsertItem which have slightly different names - the choice of which should be reasonably obvious.

Because the functions in the wxcore API are so closely related to the C++ API, the good news is that you can more or less just translate any sample code for C++ into Haskell. The bad news is that it feels a lot like programming in C++.
 
Also, as I said in the title, I'd really appreciate if someone could
take some time to be available for a few beginner questions on some
chat or email platform. I find that wxHaskell has too much lore for me
to learn without an experienced hand guiding me. I promise to research
every question before I resort to asking my mentor.

You will find that list contributors are usually pretty helpful. I would suggest that that you start with my blog: http://wewantarock.wordpress.com While it is far from complete, and is only updated rather sporadically, it has been written to answer some of the issues I came up against when taking on wxHaskell as a new maintainer.

For your specific problem with ListCtrl, you may do well to look at the wxWidgets Programming book. This is (obviously) written for C++, but covers Virtual ListCtrl (on page 330). There seems to be a downloadable PDF at http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&ved=0CGQQFjAE&url=http%3A%2F%2Fptgmedia.pearsoncmg.com%2Fimages%2F0131473816%2Fdownloads%2F0131473816_book.pdf&ei=DDxwT8KDFMKeOrWwqeEF&usg=AFQjCNG49vErXpJEtko5Xe1uROZP-Asp6w

Best regards
Jeremy