Thanks for the idea. I think i'm close to fixing it, but not yet...
Do i have to initialize the variable titile..(Coz that's one of the warnings
i'm getting..)
>You never allocate space for the variable 'title'. Your StrCopy is
> copying into random territory, and you really should have crashed them.
How do i allocate space for the variable 'title'...
Thanks Ben
Praveen
> > recordH = DmQueryRecord(SiteDB, 0);
> > recordP =(SiteDeptRecordTypePtr)MemHandleLock(recordH);
> >
> > StrCopy(title, recordP->siteLookup);
> > StrCat(title, " ");
> > StrCat(title, recordP->deptLookup);
> >
> > FrmSetTitle(frm, title);
>
> This code is going to fail badly.
>
> 1) You never allocate space for the variable 'title'. Your StrCopy is
> copying into random territory, and you really should have crashed them.
>
> 2) Calling FrmSetTitle with a pointer to random space is bad, since Palm
> OS will store away the pointer and use it to redraw the title when its
> needed.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/