Hello, I’m starting to learn how to do an application with PhAB. I want to learn how to use PtTrend widget. I’d tried to do a window with a button which sets a function in a trend when it is pressed.
The function is:
when I press the button (widget in this function) it supposed that a line from left bottom to right top could be drawn in trend widget but instead of this a reverse triangle is drawn.
I don’t know what I’m doing wrong.
Moreover, i want refresh the function in the trend when i push the button. I read something about PtFlush() but I don’t understand how it works.
Thanks.
P.D. Sorry for my poor English. If someone needs any explanation ask me for it.
Hello Gareth_00,
Actually there is no reason to expect that the line in this case will go from left bottom to right top corner. Please consider the following fragment from PtTrendChangeData description:
“If last_sample + nsamples - 1 is outside the range of samples for the widget, some initial portion of the new data is discardedâ€
Currently Im start to work with QNX and PhAB. i read some documents to have idea of how this development environment works but when i tried to test this code i can’t seen nothing over the Trend Component, What could be the problem?. The code its linked to a Button with activate callback code type.
Well here’s what I did. I created a new PhAB project. I put in a trend widget that I called base_Trend0. I put in a button. I set the Activate callback on the button to call Graphics().
When I press the button continually, the image changes between two graphs. One is a line with positive slope and the other a line with negative slope. That seems to be what the code is trying to do. So I think maybe you don’t have something connected right. I can post the project if you like.