Andre, You need to segment your application. Look in the documentation on "multi-segmented" applications. It means you will have to arrange your code so that certain functions are grouped together within 32K of each other in the code segments. It's a fairly complex subject, so you should read up on it before attempting. There are certain functions that must be in the first segment, so pay attention to that.
Fortunately, once you know what segments you need, the CodeWarrior IDE handles this in a fairly easy manner. Regards -E -- Join us at the PalmSource Mobile Summit & DevCon 2005 San Jose, California - May 24-26, 2005 www.palmsource.com/events > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Andre Augusto > Sent: Tuesday, May 10, 2005 6:54 PM > To: Palm Developer Forum > Subject: Code reference out of range... (codewarrior + C++) > > Hello everybody! > At this time, i never had problems in constructing forms and > then create handle events functions for them. But recently I > added a login form in my app that has 2 fields. In the > AppHandleEvent(EventType * eventP) I use switch (formId) > { > case LoginForm: > FrmSetEventHandler(frmP, LoginFormHandleEvent); > break; > .... > .... > .... > but I get a compiler error that says: > "Link Error: Helpdesk_PDA.cpp: 'AppHandleEvent(EventType *)' > 16-bit code reference to 'LoginFormHandleEvent(EventType*)' > is out of range." > > Does anyone knows what this means? Here is the code I use... > Thanks everybody! > > Andr� Augusto > > static Boolean AppHandleEvent(EventType * eventP) { > UInt16 formId; > FormType * frmP; > > if (eventP->eType == frmLoadEvent) > { > /* Load the form resource. */ > formId = eventP->data.frmLoad.formID; > frmP = FrmInitForm(formId); > FrmSetActiveForm(frmP); > > /* > * Set the event handler for the form. The handler of the > * currently active form is called by FrmHandleEvent each > * time is receives an event. > */ > switch (formId) > { > > case ListagemPATsForm: > FrmSetEventHandler(frmP, ListagemPATsFormHandleEvent); > break; > ...... > } > return true; > } > > return false; > } > > > > Boolean LoginFormHandleEvent(EventType * eventP) { > Boolean handled = false; > FormType * frmP; > > switch (eventP->eType) > { > case menuEvent: > return LoginFormDoCommand(eventP->data.menu.itemID); > > case frmOpenEvent: > frmP = FrmGetActiveForm(); > FrmDrawForm(frmP); > handled = true; > break; > > case frmUpdateEvent: > /* > * To do any custom drawing here, first call > * FrmDrawForm(), then do your drawing, and > * then set handled to true. > */ > break; > } > > return handled; > } > > -- > For information on using the Palm Developer Forums, or to > unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
