>I have been tryint to get TxtGluePrepFindString to work in a program, of mie
>and with no luck. I have included "TxtGlue.h" and linked the
>PalmOSGlue.lib. In fact I am using the TxtGlueStripSpaces succesfully so I
>kow I have the lib. But with the code below I get a very ugly error:
>
> textH = MemHandleNew(35);
> addrName = MemHandleLock( textH );
> TxtGluePrepFindString(recordAddress.fields[name], addrName, 35);
>
>recordAddress.fields is a Char* as required by the function angain cpnfirmed
>by using it in TxtGlueStripSpaces which al;so requires a Char* and its not
>null.
>
>The error I get is: App performed an Illegal Operation. It performed a
>"bus error".
Whenever you report a problem like this, it's very useful if you also
include the ROM version...the entire ROM name (if downloaded from the
Palm web site) or the device you sucked it out of is also handy.
For example, in this situation glue code does different things,
depending on whether you're running on pre-3.1, pre-3.5, or >= 3.5
versions of the ROM.
>I tried to debug the application via CodeWright and the Emulator with a
>Debug ROM but with a debug ROM I cant even open the app let alone hit the
>button which execute the code anove. I get a MemoryMgrNw.c Line.4866, Chunk
>under-locked. I don't
>know where this error comes from since the same app in a normal ROM open
>fine.
This sounds like a different, unrelated problem.
>The long and the short of it is 1. I'm lost and 2. What does
>"TxtGluePrepFindString" actaully do.
If you're passing your own search string to FindStrInStr or
TxtFindString, then this string has to be "prepared" via a call to
TxtGluePrepFindString. Currently for Latin this just does a
case-remapping and strips diacriticals, but that could change in the
future. For Japanese it jumps through all kinds of hoops, including
forcing everything to be a wide (two-byte) character.
So yes, you do need to call this routine if you're using custom search strings.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/