Re: Still unbuildable on Windows


Subject: Re: Still unbuildable on Windows
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Fri Apr 13 2001 - 07:03:13 CDT


Mike Nordell wrote:
>
> Andrew Dunbar wrote:
> > Hmm the errors result from trying to define these member functions
> > and not from trying to call them...
>
> It's obvious, everything is in the error message. :-)
>
> > 'checkWord' : overloaded member function
> > 'enum SpellChecker::_SpellCheckResult (unsigned short *,unsigned int)'
> > not found in 'ISpellChecker'
>
> The signature of the 'checkWord' member function does not match the
> declaration of it.
>
> I'll take care of this if someone please tell me what the heck is going on
> in AP_Win32Dialog_Spell. In line 220 of its implementation file we find
> if (!m_Suggestions.count)
>
> This is three errors in one:
> 1) This class does not contain a member 'm_Suggestions'.
> 2) it's defined in the baseclass (and this way leads to sorrow and misery,
> accessing baseclasses data as it was our own). And finally
> 3) 'm_Suggestions' is a pointer to a UT_Vector.
>
> After this I'm lost, since UT_Vector doesn't contain any members resembling
> 'count' or 'word'.

Hi Mike, here is a patch I sent yesterday which makes
AP_Win32Dialog_Spell
compile on windows with the spellchecker changes. I hope this gets us
on our way.

Andrew.

-- 
http://linguaphile.sourceforge.net

Index: src/wp/ap/win/ap_Win32Dialog_Spell.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Spell.cpp,v retrieving revision 1.6 diff -u -r1.6 ap_Win32Dialog_Spell.cpp --- src/wp/ap/win/ap_Win32Dialog_Spell.cpp 2001/02/06 22:54:54 1.6 +++ src/wp/ap/win/ap_Win32Dialog_Spell.cpp 2001/04/12 20:54:13 @@ -217,7 +217,7 @@ FREEP(p); // insert suggestions - if (!m_Suggestions.count) + if (!m_Suggestions->getItemCount()) { const XAP_StringSet * pSS = m_pApp->getStringSet(); SendMessage(m_hwndSuggest, LB_ADDSTRING, 0, (LPARAM) pSS->getValue(AP_STRING_ID_DLG_Spell_NoSuggestions)); @@ -227,9 +227,9 @@ } else { - for (int i = 0; i < m_Suggestions.count; i++) + for (int i = 0; i < m_Suggestions->getItemCount(); i++) { - p = (UT_UCSChar *) m_Suggestions.word[i]; + p = (UT_UCSChar *) m_Suggestions->getNthItem(i); len = UT_UCS_strlen(p); if (len) { @@ -258,7 +258,7 @@ // should be safe here, because there just aren't that many suggestions m_iSelectedRow = (short) SendMessage(m_hwndSuggest, LB_GETCURSEL, 0, 0); - if (!m_Suggestions.count) + if (!m_Suggestions->getItemCount()) { // no change to suggest, ignore it if (m_iSelectedRow != -1) @@ -313,7 +313,7 @@ if (m_iSelectedRow != -1) { - replace = (UT_UCSChar*) m_Suggestions.word[m_iSelectedRow]; + replace = (UT_UCSChar*) m_Suggestions->getNthItem(m_iSelectedRow); changeWordWith(replace); } else @@ -336,7 +336,7 @@ UT_UCSChar * replace = NULL; if (m_iSelectedRow != -1) { - replace = (UT_UCSChar*) m_Suggestions.word[m_iSelectedRow]; + replace = (UT_UCSChar*) m_Suggestions->getNthItem(m_iSelectedRow); addChangeAll(replace); changeWordWith(replace); }

_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com



This archive was generated by hypermail 2b25 : Fri Apr 13 2001 - 07:01:53 CDT