At 12:00am -0800 01-01-27, Palm Developer Forum digest wrote:
>Subject: FrmCustomAlert & Invalid Field Insertion Point one last? time
>From: "Chris DiPierro" <[EMAIL PROTECTED]>
>Date: Fri, 26 Jan 2001 09:39:41 -0500
>X-Message-Number: 10
>
>I thought I had solved all of these, but Gremlins turned up another.
>
>I've got a FrmCustomAlert call that calls an alert with a single ^1 in it.
>
>It works fine except when the string passed to ^1 has a newline in it. Now,
>normally this isn't the case, but Gremlins can put a lot of odd things in
>your app, so this is causing a Gremlins crash.
>
>I *THOUGHT* the appropriate thing to do in this situation is just have:
>FrmCustomAlert (TheAlert, TheString, NULL, NULL)
>
>Since there's no ^2 or ^3 in the alert. But I've tried " " in place of the
>NULLs as well and still get the error.
>
>If I make a function that strips newlines and use that on the string, all
>works, but some how I don't feel as if I should have to do that.
>
>Can someone offer advice?

This is a known problem with debug ROMs, where any alert which winds 
up with one or more linefeeds at the end of the text message will 
trigger an invalid insertion point warning from the field code.

At 12:00am -0800 01-01-27, Palm Developer Forum digest wrote:
>No, but I can see *exactly* what is happening. The text field generated by
>FrmCustomAlert clearly has the single line property set. So you are stuffed,
>too.

Actually the problem is that the alert code intentionally reduces the 
height of the text field bounding rectangle so that the trailing 
linefeeds are truncated. Unfortunately the insertion point was set to 
the end of the text when the field was created, and the insertion 
point visible flag was also set true, so the field code correctly 
complains about a situation where the insertion point should be 
visible but it isn't.

The only work-around currently is the one you suggest, which is to 
strip off trailing linefeeds yourself.

-- 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/

Reply via email to