"Shay" <[EMAIL PROTECTED]> wrote:
> there are 2 applications : app' (1) & app' (2).
> i want to build an application (1) that interacts with another application
> (2).
> i know i can get a trap whenever the specific application (2) is running,
> and then do whatever i want in the application (1).
> should i build a timer trap and every specific time in the timer the
> application (1) will get the CPU, and do what she wants, and then i'll
> return to application (2) ?
As has been mentioned, user apps have only one task at their disposal.
However, what you propose is possible. Implement your second app as
part of the first, and have it run when your app receives an alarm. App
1 runs, sets an alarm, runs some more, alarm happens, "app 2" runs,
perhaps reschedules an alarm, finishes, app 1 resumes, and so on.
The only real drawback is that code running under an alarm launch code
does not have access to global variables. You could get around this by
not using global variables at all: define all your variables in a
struct, and have app 1 allocate memory and store its address in a
feature. App2 would get the address from the feature and access via the
pointer. Just be sure that when your app 1 receives the appStopEvent,
you free the memory and disable the alarm for app 2.
--
Roger Chaplin
<[EMAIL PROTECTED]>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html