I'm trying to implement my first List object, following the sample in the
Palm OS Programming Bible, but my code won't compile. I get the error msg
"illegal implicit conversion from 'void (unsigned short, struct
RectangleType *, char **)' to 'void (*) (short, struct RectangleType *, char
**)'"
My function prototype is:
static void MainListDraw(UInt16 itemNum, RectangleType *bounds, char
**ItemsText);
The function is:
static void MainListDraw(UInt16 itemNum, RectangleType *bounds, char
**ItemsText)
{
// ListElements is a global array of strings for now
WinDrawChars(ListElements[itemNum], StrLen(ListElements[itemNum]),
bounds->topLeft.x, bounds->topLeft.y);
}
In MainFormHandleEvent() I have the following exerpted code:
{
FormPtr frmP;
ListType *lstP;
UInt8 NumListItems = 0;
switch (eventP->eType)
{
case frmOpenEvent:
frmP = FrmGetActiveForm();
MainFormInit( frmP );
lstP = FrmGetObjectPtr(frmP,FrmGetObjectIndex(frmP, MainWordList));
LstSetListChoices(lstP,NULL,0);
LstSetDrawFunction(lstP,MainListDraw); <-- THIS IS THE LINE OF CODE WHERE
THE ERROR IS MARKED
FrmDrawForm ( frmP );
handled = true;
break;
}
}
Any help would be most appreciated!
TIA
Walter
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/