On that subject of doing long calculations, I'd like to know a
related aspect of the API -- whether there is a function
which allows me to fork a thread or light-weight process or
something. I thought I saw something like this in the palmOS
API documentation somewhere, or in a book.
There seem to be several ways of doing background calculations
in conjunction with a user interface:
1. Insert event-ready checks into one or more for-loops
in the calculations.
2. Fork a separate process or thread or something.
3. Have asynchronous signal/event handlers as in Unix.
Method 1, which you were discussing, is a bit articificial.
It requires analysing the calculation to find out where
is a suitable place to insert event-ready checks so that
they are (a) not too frequent and (b) not too infrequent.
This sometimes requires quite a bit of algorithmic analysis.
Question: Is there indeed a thread-forking facility of some sort?
I know that there is supposed to be an underlying
multi-tasking kernel Kadak whose process creation facilities
are not brought out to the PalmOS API. But that doesn't
absolutely mean that no sort of thread is allowed.
Second question: Can user events be made to cause an alarm?
Since a clock event can be scheduled to invoke a process
asynchronously (if I understand the AlmSetAlarm function correctly),
could it be that GUI events could also cause an alarm event?
(This would be like Unix SIGIO signals, I think.) I don't see any
GUI events among the Launch codes.
Cheers,
Alan Kennington.