Thanks tim,
I have succesfully convert the application to multi segment and it's quite
easy to do.
For those who encounter this problem just create a new target copied from
existant
and change the PalmOs library to the good one.(see metrowerks or palmos
documentation for library).
Add a segment and  reorganize your segments.
Change option link single libary and it's ok.

Regards


"Tim Kostka" <[EMAIL PROTECTED]> a �crit dans le message de news:
[EMAIL PROTECTED]
> It sounds like your code is getting too big for one segment.  You
basically
> have two options:  rewrite your code each time you want to add something,
or
> create a multi-segment application.  The latter is actually quite easy and
> you should be able to find lots of examples should you need them.  It may
> take some time to divide your current source file into smaller files, but
> it'll get rid of that linking error and allow for easier code additions.
> --
> Tim Kostka
> http://www.nuprograms.com
>
>
> "Fr�d�ric Dessallien" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello,
> > I am writting my first c code warrior application  and i
> > encountered this problem at compilation :
> > Link error : 'AppHandleEvent' 16 bit code reference to
> > 'CntPlasmMTFormHandleEvent' is out of range
> >
> > I think i have got too much forms in my application but i have seen
other
> > applications with much more forms.
> > (if i comment one form handle event compilation is ok)
> >
> > I call 20 different forms (calcul forms) in this application which have
> > different presentation and building forms on the fly
> > would be too hard for this time .
> > Single Segment of application is 35 ko.
> >
> > Is someone know the right explication of this link error and (or) have
a
> > solution ?
> >
> > Code :---------------------------------------------------
> > static Boolean AppHandleEvent(EventPtr event)
> > {
> >   UInt16 formId;
> >   FormPtr form;
> >
> >   if (event->eType == frmLoadEvent) {
> >     // Load the form resource.
> >     formId = event->data.frmLoad.formID;
> >     form = FrmInitForm(formId);
> >     ErrFatalDisplayIf(!form , "Can't initialize form");
> >     FrmSetActiveForm(form);
> >     //utility
> >
> >     // 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 MainForm :
> >       //gActiveForm = MainForm ;
> >       FrmSetEventHandler(form, MainFormHandleEvent);
> >       break;
> >
> >
> >     case MenuForm :
> >       //gActiveForm = MenuForm ;
> >      FrmSetEventHandler(form, MenuFormHandleEvent);
> >      FrmSetGadgetHandler(form,
> >      FrmGetObjectIndex(form,GAD_MFORM ),
> >      TestGadgetHandler);
> >    break;
> >
> >
> > [ etc.... ]
> >
> > case CNTPMTFORM :
> >      FrmSetEventHandler(form ,CntPlasmMTFormHandleEvent);
> >      FrmSetGadgetHandler(form,
> >       FrmGetObjectIndex(form,GAD_CNTPMT),
> >         TestGadgetHandler);
> >      break ;
> > -----------------------------------------------------------------
> > (Sorry for my poor english).
> >
> > Thanks
> >
> > fred
> >
> >
> >
>
>
>




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to