Thanks for the explanation.
Yes, it has to maintain a constant connection or the other end will log out
requiring the Palm to perform a lengthy re-login.. Unfortunately I do not
have any control over this. The timeout may vary but for the most part its
over 5 seconds. No communication for 5 seconds and a logout could happen.
This shouldn't be a problem as most people don't hold controls for more than
a few seconds at most. But it just doesn't make for a clean program if this
problem is looming, just waiting to happen.
I'm not very familiar with the whole trap thing but I will look into your
suggestion. Thanks.
-Mike
"Aaron Ardiri" <[EMAIL PROTECTED]> wrote in message news:52923@palm-dev-forum...
>
> > This is pretty darn close to running a separate process in the
background
> > independent of what the rest of the app is doing, except for the
following:
> > I notice most of the form controls will stop the event loop if the
stylus is
> > held on them. Is there any way to still process events during this time
or
> > is it built into the GUI controls that it doesn't exit the controls
event
> > handler until an evtPenUp occurs?.
>
> look at the os source code :) and, you'll see why :P
>
> pretty much a while loop is implemented in the system event handler..
> if you want pure "threading" as to say, you need to use Timers.. and,
> those my friend, are out of bounds :) very undocumented.. although,
> *some* of us have looked into it, and got it working.. but, releasing
> anything using it could cause licensing problems with Palm and the
> kernel creator Kadak (sp?) - i am sure some people have released stuff
> :)) but, obviously not in source code form :)
>
> you *could* trap the following events:
>
> EvtGetEvent() and EvtGetPen()
>
> using SysSetTrapAddress() and call your little comms function before
> calling the system variants.. but, this doesn't help you when someone
> writes a loop like this:
>
> while (1)
> {
> }
>
> :) since there is nothing to trap, its stuck :) is there a real need
> to keep the connection open like the way you have it? how strict are
> your timeout periods? maybe you should timeout based on event count..
> not on time.. ?
>
> // az
> [EMAIL PROTECTED]
> http://www.ardiri.com/ <--- free games!
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/