Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems getting a wx_find_replace_data

2 views
Skip to first unread message

Roger Olivet

unread,
Jan 27, 2004, 2:31:33 PM1/27/04
to
Hi all.
I'm working with the eiffel wx_find_replace_dialog, and I'd be really
great if you'd help me. Thanks.

I can get the string i want to search doin'
s_search := wx_find_replace_data.find_string
But when I what to get the string I want to replace with, doing
s_replace := wx_find_replace_data.replace_string
it gives my the string I want to search ( it seems it returns the same
as s_search := wx_find_replace_data.find_string)

The code I have is:
...
create wx_find_replace_data.make (0)
create wx_find_replace_dialog.make (wxw_parent, wx_find_replace_data,
"Search & Replace", 1)
...

Geoff Eldridge

unread,
Jan 27, 2004, 6:30:07 PM1/27/04
to
roger...@hotmail.com (Roger Olivet) wrote in message news:<4e954487.04012...@posting.google.com>...

In the following interface file:

${ELJ}\elj-2002\lib\ifs\c\ewxw\eljfindrepldlg.cpp

you will need to modify the following function from:

-- note: `GetFindString' used instead of `GetReplaceString'
-- (looks like an initial cut and paste error)

--8<--
EWXWEXPORT(int,wxFindReplaceData_GetReplaceString)(void* _obj, void* _ref)
{
wxString tmp = ((wxFindReplaceData*)_obj)->GetFindString();
if (_ref)
memcpy(_ref, tmp.c_str(), tmp.Length());
return tmp.Length();
}
-->8--

to:

--8<--
EWXWEXPORT(int,wxFindReplaceData_GetReplaceString)(void* _obj, void* _ref)
{
wxString tmp = ((wxFindReplaceData*)_obj)->GetReplaceString();
if (_ref)
memcpy(_ref, tmp.c_str(), tmp.Length());
return tmp.Length();
}
-->8--

You will need to regenerate your wxEiffel.dll and wxEiffel.lib files as per:

http://cvs.sf.net/viewcvs.py/elj/elj-2002/lib/ifs/c/ewxw/make-2.4/README

or locally:

${ELJ}\elj-2002\lib\ifs\c\ewxw\make-2.4\README

Hope this helps ..

I will update the CVS in case there is a future release of wxEiffel [1].

Geoff

[1] http://elj.sourceforge.net/status/

0 new messages