On 4/3/08 08:04, viktoras didziulis wrote:
...trying to figure out more than one (well... two) way of how one can
make Revolution read a constant data stream coming via sockets, "never
ending" log files, GPSes or any other real time monitoring system.
Application has to display the changing status of these readings and in
the same time have the user interface with all the buttons and menus
completely responsive to user actions.
So far the only way I can imagine is creating 2 separate applications -
[snip]
2) application GUI has to be split into 2 separate windows, I would
prefer having both app_1 and app_2 in a single window.
Are the other ways to handle this in Revolution without having to write
an external handler in C++?
Yes. There are two things to notice here:
- using "send" command with a delay, even a tiny one
- many of the relevant commands, eg "read from socket", allow you to
specificy a callback message.
Using these features effectively gives you... we're not allowed to say
threads, but multiple apparently simultaneous/parallel execution paths. I've
done exactly this with a GPS, where the app had a normal responsive user
interface, and was also updating the display and sometimes taking special
actions in response to reports from the GPS.
Obviously you need to program with care in these areas to avoid deadlocks,
resource clashes etc; but with a little care it's perfectly possible to deal
with the kind of things you're talking about, without using external handlers,
two apps, or even two windows.
HTH,
- Ben
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution