Realtime Animation using PhAB?

I’m trying to make my bar graphs animate in time, and my pixels change
color in time, but all I see when I run the code is the final image. It
doesn’t animate. I’ve tried using the sleep function but it doesn’t
work. I’ve also tried using Watcom C++ functions, but the Application
Builder doesn’t like Watcom include files. I read the docs on the
animation chapter in the Programmers Guide, but not sure how to store
these images in the database. Because there will be thousands and
thousands of images since the data for the bar graph changes
according to the data that is in the file that is being read.
Any help would be appreciated.

– Channarith Vanthin

Channarith,
I assume that you modify your bargraphs in a loop or sth. like that? If you
do that, than Photon doesn’t get any chance to update the widgets.
You can either
a) put a PtFlush into your loop. This is dirty, I wouldn’t recommend it.
Your app would block every other Photon event
b) Better use a timer widget. In the timer callback, you can easily change
the bargraphs

Markus


“Channarith Jerome Vanthin” <cvanthin@wpi.edu> wrote in message
news:Pine.OSF.4.21.0009131631240.12576-100000@reno.WPI.EDU

I’m trying to make my bar graphs animate in time, and my pixels change
color in time, but all I see when I run the code is the final image. It
doesn’t animate. I’ve tried using the sleep function but it doesn’t
work. I’ve also tried using Watcom C++ functions, but the Application
Builder doesn’t like Watcom include files. I read the docs on the
animation chapter in the Programmers Guide, but not sure how to store
these images in the database. Because there will be thousands and
thousands of images since the data for the bar graph changes
according to the data that is in the file that is being read.
Any help would be appreciated.

– Channarith Vanthin

Just as a total aside. If you wanted just simple offline animation you
could use the PtFlash widget and author the content using the
Macromedia Flash 4 application using QNX RTP.
Just an aside,
Jim


“Markus Loffler” <loffler@ces.clemson.edu> wrote in message
news:8prf8c$7d7$1@inn.qnx.com

Channarith,
I assume that you modify your bargraphs in a loop or sth. like that? If
you
do that, than Photon doesn’t get any chance to update the widgets.
You can either
a) put a PtFlush into your loop. This is dirty, I wouldn’t recommend it.
Your app would block every other Photon event
b) Better use a timer widget. In the timer callback, you can easily change
the bargraphs

Markus


“Channarith Jerome Vanthin” <> cvanthin@wpi.edu> > wrote in message
news:> Pine.OSF.4.21.0009131631240.12576-100000@reno.WPI.EDU> …

I’m trying to make my bar graphs animate in time, and my pixels change
color in time, but all I see when I run the code is the final image. It
doesn’t animate. I’ve tried using the sleep function but it doesn’t
work. I’ve also tried using Watcom C++ functions, but the Application
Builder doesn’t like Watcom include files. I read the docs on the
animation chapter in the Programmers Guide, but not sure how to store
these images in the database. Because there will be thousands and
thousands of images since the data for the bar graph changes
according to the data that is in the file that is being read.
Any help would be appreciated.

– Channarith Vanthin