Hi all,

I have a problem in converting my program written in CW5 (palmOS 3.0) to CW7
(palmOS 3.5).  Listed below is my sample program in CW5 (which I could
compile and run), but in CW7 creates error:

-------------------------------- (this procedure is fine)
VoidPtr GetObjectPtr (Word objectID)
{
 FormPtr frm;
 frm = FrmGetActiveForm ();
 if( frm )
  return (FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, objectID)));
 else
  return NULL;
}

--------------------------- This one create error:
CharPtr GetButtonDesc (Word objectID)
{
 CharPtr  fldChar;
 fldChar = CtlGetLabel(GetObjectPtr(objectID));
 return fldChar;
}

The error is : illegal implicit convertion from 'const char *' to 'char *'

However, I have tried to add (CharPtr) in front of CtlGetLabel function, as
decribed below
 fldChar = (CharPtr) CtlGetLabel(GetObjectPtr(objectID));
Then, the error is out.

My question is :  Why by adding type of variable (CharPtr) is eliminating
the error?  Is this a new feature implemented in CW version 7.   Before it
works just fine in CW version 5.
Any help is greatly appreciated....

S Santoso







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