Bugs item #2851194, was opened at 2009-09-04 11:12
Message generated for change (Tracker Item Submitted) made by timfinnegan
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536845&aid=2851194&group_id=73133

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tim Finnegan (timfinnegan)
Assigned to: Nobody/Anonymous (nobody)
Summary: FindReplaceData issue

Initial Comment:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536845&aid=2851194&group_id=73133

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel

Reply via email to