I am certainly no PalmOS expert, but: are you sure your main form's event
handler is being set? I.e.:

  FrmSetEventHandler(pFrm, MainFormHandleEvent);

It may that the code responsible for this doesn't expect a
sysAppLaunchCmdSyncNotify, and thus isn't initializing your form properly.

Also, as I understand it, your global variable will be unavailable if you
launch your program with this code; perhaps the app should send a
sysAppLaunchCmdNormalLaunch back to itself, instead of starting the event
loop; this might solve both problems. Just a thought.

Best regards,

Jeremy Neal Kelly
------------------------------------
"Jeroen Jonkman" <[EMAIL PROTECTED]> wrote in message
news:42175@palm-dev-forum...
>
> I made a program for a customer with a button for a hotsync
> operation.( They are not allowed to exit the program, but they have to
> hotsync, so I have put this behind a button )
>
> the action when I press the Button is  :
>
> AppLaunchWithCommand(sysFileCSync, sysAppLaunchCmdSyncRequestLocal,
> NULL);
>
> This works fine, he really syncs, but I have to go back to the program
> after the hotsync is finished. What I use here is some code ( in
> PilotMain ) like this:
>
> DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
> {
> // Check for a normal launch.
> if ((cmd == sysAppLaunchCmdNormalLaunch)
> || (cmd == sysAppLaunchCmdSyncNotify))
> {
> StartApplication();
>         // Start up the event loop.
> EventLoop();
> // Close down Scan Manager, decoder
> StopApplication();
>
>
> The program really starts when the hotsync is finished, but just
> before StartApplication(); it crashes with:
>
> FATAL ERROR
> Form.c, line:3789, No Eventhandler
>
> Can anyone tell me what am I doing wrong here ?
>
>



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