#47 FindReplaceData issue

closed-fixed
None
5
2010-06-04
2009-09-04
No

Sorry for the unconventional bug report, but I posted this to the mailing list wxhaskell-user before I discovered this bug-tracker:

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 (it's also part of the Main.hs file attached)

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:

EWXWEXPORT(wxString*,wxFindReplaceData_GetReplaceString)(void* _obj)
{
wxString *result = new wxString();
*result = ((wxFindReplaceData*)_obj)->GetFindString();
return result;
}

I think the correct code should be:

EWXWEXPORT(wxString*,wxFindReplaceData_GetReplaceString)(void* _obj)
{
wxString *result = new wxString();
*result = ((wxFindReplaceData*)_obj)->GetReplaceString();
return result;
}

Here are the environments I tested my program in:
* OSX using GHC 6.10.4 with wx-0.11.1.2 with wxWidgets-2.8.10
* Ubuntu 9.04 using GHC 6.10.3 with wx-0.11.1.2 with wxWidgets-2.8.10

Discussion

  • Tim Finnegan

    Tim Finnegan - 2009-09-04

    Bug Sample

     
  • Jeremy O\'Donoghue

    Agree with your analysis. Patch committed as proposed, and will be released in 0.12.5.

     
  • Jeremy O\'Donoghue

    • assigned_to: nobody --> jodonoghue
    • status: open --> pending-accepted
     
  • Jeremy O\'Donoghue

    • status: pending-accepted --> pending-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks