WPCubed Product Support

FindText() / FindTextA() problem

Hi Julian.

there is only a FindText, not a FindTextA
I know. That's why I am so puzzled.

But you can also directly use the "Command" method to do the serach.
I have done as you suggested and it certainly works, though I'm still trying to find an explanation for what was happening. How can Builder's "Code completion" detect a FindTextA method that does not exist?

Thank you for answering.
Edorta

#3 ♥ 0
5.4k Views 2 users read 2 min
support

Hi,

there is only a FindText, not a FindTextA.

But you can also directly use the "Command" method to do the serach.

The code for FindText is

CommandEx(COMPDF_FindGotoPage, Integer(DontGoToPage));
CommandEx(COMPDF_FindCaseInsitive, Integer(CaseInsensitive));

// If we search case insensitive we simply search 2 versions of the same string
// This allows the support of charsets
if CaseInsensitive then
begin
CommandStr(COMPDF_FindAltText, AnsiUpperCase(Text));
Text := AnsiLowerCase(Text);
end;

if FindNext then
Result := CommandStr(COMPDF_FindNext, Text)
else
Result := CommandStr(COMPDF_FindText, Text);

if HighLight then
CommandStr(COMPDF_HighlightText, Text);

So you can basically call

CommandStr(COMPDF_FindText, Text);

Julian

#2 ♥ 0

Hi,

I get a linker error compiling wpViewPdf3 in Borland C++ Builder 5 (Windows XP).
The error says:
[Linker Error] Unresolved external '__fastcall Wpviewpdf3::TWPViewPDF::FindTextA(System::AnsiString, bool, bool, bool, bool)' referenced from ...

This is what I have:
int p= WPViewPDF1->FindText(SomeText,...

If I change in my code FindText to FindTextA I still have this problem.
Borland C++ Compiler's "Code Completion" only shows FindTextA as a method but in wpViewPdf3.pas the method is defined as Findtext (without A, that I guess stands for AnsiString). There is no FindTextA declaration anywhere.

Is there a disjoint between how the method was registered, to what it actually should be in the hpp files?
Do I lack any reference?

Any help would be much appreciated!

Thanks,

Edorta

#1 ♥ 0