When you use FrmCopyTitle, the size (StrLen) of the title must not be larger
than the original title or other parts of the form will be over-written and
your app may crash.  When you use FrmSetTitle, you are passing it a pointer
to a new title for which you have allocated memory, so you aren't
over-writing anything and it works.  The message under OS4 ("Form.c,
Line:5630, Text for object #0 in form #1000 is too long") describes your
original error.  (The form title must be object #0.)

An alternative method to fix this problem is to make sure that the original
form title, set at design time, is as long or longer than any title you will
use at run time.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ji Lee
> Sent: Tuesday, February 20, 2001 12:47 PM
> To: Palm Developer Forum
> Subject: Re: OS4 Form.c Line 5630?
>
>
> Thanks for replying. =) It was my first post and I was rather worried that
> maybe I did something wrong.
>
>  I did solve the problem but I am not 100% sure if it was a correct fix.
> After running through CW debugger, I saw that it was a form title as well.
> And form title was set to
> "yyyyyyyyyyyyyyyyyyyyyyyyyy" and some random chars. Odd thing was when I
> check on
> Constructor, it shows proper title. And this random chars doen't
> change even
> after I do
> FrmCopyTitle() although the form title actually changes to new title I
> passed to.
> The error message was thrown everytime FrmCopyTitle() was called.
>
> I got around this problem by allocating memory for title and calling
> FrmSetTitle() upon FrmOpenEvent
> and free the memory upon FrmCloseEvent. It seems to work fine..
> but I am not
> 100% sure
> whether this is correct fix..
>
> Thanks!
>
> -Ji
>
>
> "William F. Weiher" <[EMAIL PROTECTED]> wrote in message
> news:40364@palm-dev-forum...
> >
> > Form.c is the source file for part of the OS code so Form.c line:5630
> telly
> > you where in the source code the 'error' was detected.
> Unfortunately that
> > will not help you much since the OS4 sources have not yet been released
> even
> > if you are part of the Aliance program and have signed the NDA
> for source
> > access. However, form #1000 is the resource id of the form on which the
> > error occured (look in constructor for your project) and I believe that
> > object#0 is always the form title so check the title on this form to see
> if
> > it unusually long. This is probably something that did not work quite
> right
> > in 3.5 and the OS4 roms have more error checking
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ji Lee
> > Sent: Saturday, February 17, 2001 15:09
> > To: Palm Developer Forum
> > Subject: OS4 Form.c Line 5630?
> >
> >
> > Hi,
> >
> > I have a app that runs fine under 3.5 rom images (both debug
> and non-debug
> > images)
> > However, when I run it under OS4dr4 images, I keep getting this error:
> > "Form.c, Line:5630, Text for object #0 in form #1000 is too long".
> > Form.c, of course, is not in my source.. I have no idea what might cause
> > this,
> > especially since all of the object IDs starts at 1000..  I'd appreciate
> any
> > hints..
> >
> > Thanks.
> >
> > -Ji
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> > please see http://www.palmos.com/dev/tech/support/forums/
> >
> >
> >
>
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>


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