Try this
//-----------------------------------------------------------------------
In Starter.c
#include "a.h"
FormPtr pForm = FrmInitForm( NewForm );
FrmSetEventHandler( pForm, NewFormHandleEvent );
//-----------------------------------------------------------------------
In a.cpp
#include "a.h"
Boolean NewFormHandleEvent(EventPtr eventP)
{
Boolean handled = false;
return handled;
}
//-----------------------------------------------------------------------
In a.h
extern Boolean NewFormHandleEvent(EventPtr eventP);
Steve Strelzyk
Software Engineer
Lattice, Inc
Phone (630) 949-3250 x278
(800) 444-4309 x278
Fax (630) 949-3299
Email mailto:[EMAIL PROTECTED]
-----Original Message-----
From:
Sent: Friday, March 09, 2001 6:23 AM
Subject: FrmSetEventHandler Problem
Dear All,
I tried to set the form event handler which is written in a seperate C file
and its declaration is written in its corresponding H file. The H fle has
already been included in the C file which call the Form Event Handler.
Everjthing seems alright. But I still got a error message "Link Error :
Starter.cpp: 'NewFormHandleEvent(EventType*)' referenced from
'MainFormHandleEvent(EventType*)' is undefined." How can I solve this
problem? I have alrady tried many times...., please help!!!
Thanks
Oscar
Here is my code
//-----------------------------------------------------------------------
In Starter.c
#include "a.h"
FormPtr pForm = FrmInitForm( NewForm );
FrmSetEventHandler( pForm, NewFormHandleEvent );
//-----------------------------------------------------------------------
In a.cpp
#include "a.h"
static Boolean NewFormHandleEvent(EventPtr eventP)
{
Boolean handled = false;
return handled;
}
//-----------------------------------------------------------------------
In a.h
static Boolean NewFormHandleEvent(EventPtr eventP);
--
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/