working in my first project with wxHaskell. My project includes an
editor, so I wanted to add find&replace functionality to it but
then I stepped into what I think is a little bug.
I think you'll see the problem clearly with an example (and it will be easier for me than explaining it in english :P):
Let's say you've got the following code
s <- findReplaceDataCreateDefault
findReplaceDataSetFindString s "find"
findReplaceDataSetReplaceString s "replace"
r <- findReplaceDataGetReplaceString s
You expect that, when executed, the value of r will be "replace", but it's not. It's "find" instead.
Googleing a bit, I've found that this is a known bug in wxEiffel: http://www.mombu.com/programming/eiffel/t-problems-getting-a-wx-find-replace-data-1408529.html
Then, I've checked the source code for wxHaskell (http://darcs.haskell.org/wxhaskell/wxc/src/eljfindrepldlg.cpp) and found this:
wxString *result = new wxString();
*result = ((wxFindReplaceData*)_obj)->GetFindString();
I think that explains it. Then I decided to write this mail to let you know about it, so maybe it can be fixed in the next wxHaskell release :)
Joan Crawford - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend."