--- Junyan wrote:
> hi. i would like to know what does these 2 fatal alert
> means
> 
> 1) chunk under-locked

You locked a handle, then you unlocked it, then you unlocked it again. 
You should not try to unlock it more times than you lock it.

> 
> 2) object not in form
> 

You are referring to an object that isn't in the form.  (see below)

> ...

> are there anything wrong with this coding? 

yes.

> typedef char iSubmenu[100];
> iSubmenu array[MAXSIZE];
> 
>       FldNewField ((VoidPtr) &newForm, SubmenuField, MenuX,
> MenuY, 155, 50, 0, 100 , true, true, false, true,
> leftAlign, true, false, false);                                       
>       fldptr=(FieldPtr)GetObjectPtr(SubmenuField);
> 

If you are using the GetObjectPtr() provided by CodeWarrior stationery,
then you will see that it returns a pointer to an object in the
currently active form.  It is highly likely that &newForm is not the
same form.  (BTW, the first parameter to FldNewField must be a pointer
to a pointer to a form.  Is newForm a pointer to a form?)  Furthermore,
the docs for FldNewField() state that "the old form pointer value is
not
necessarily valid after this function returns."  So, if you want to get
a pointer to an object on the form to which you have just added a new
field, you have to use the new form pointer value returned by this
function.


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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