Hi,
When you are creating new Objects, frmPP will be changing and you have to
use the new frmPP returned when you create the new object.
You are using the value that becomes invalid once you create a new object.
FormPtr * frmPP = &frmP;
>From the documentation you can get the explanation :
frmPP <-> "Pointer to the pointer to the form in which the new list is
installed. This value is not a handle; that is, the old formPP value is not
necessarily valid after this function returns. In subsequent calls, always
use the new formPP value returned by this function."
I have tried the code below its working fine..(here I am not using a
separate variable for frmPP)
FormPtr frmP;
ControlType * gctl;
frmP = FrmGetActiveForm();
gctl=CtlNewControl (&frmP, 1010, buttonCtl, "Test",43, 110, 12, 36, 0, 0,
false) ;
FrmHideObject(frmP, FrmGetObjectIndex(frmP, 1010));
Please try the above steps.
Thanks
Manikumar K
Developers' Nation DTS Engineer
Developers' Nation is the fastest, most reliable and affordable way to
resolve your technical issues.
Visit : www.devnation.net
-----Original Message-----
From: Nicolas Raitman [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 1:14 PM
To: Palm Developer Forum
Subject: FrmRemoveObject
Hi to all, I am having a problem when I try to use this funtion.
FormPtr frmP = FrmGetActiveForm();
FormPtr * frmPP = &frmP;
FrmRemoveObject ( frmPP, FrmGetObjectIndex(frmP, 7000));
The error I get when I execute the program is a memory manager error. Any
ideas or examples
on how to use the function? Just in case, the id exists since I created the
control dynamically. Can
this affect the function, if I created the control dynamically?
Thanks,
Nicolas
--
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/