Hi.

I'm working a new-to-me corner of the AB universe lately, and I'm having an 
issue that I don't yet know a solution for.  Perhaps someone else has been here 
before and can point me in the right direction.

I've created a complex chart that requires alot of CPU to calculate and draw.

Using _TRACE() I can see that the chart code is executing approximately once 
per second.  The effect of this is to tie up the CPU.

The nature of this chart is such that I only need to draw it once and I am not 
interested in updating it a) on every tick, or b) every second.

IOW, I'd basically be satisfied to draw this chart once when I apply the AFL to 
the pane.  (Secondarily, I might want to add a manual refresh button, but 
that's beside the point at the moment.)

I have tried to put the entire code in a Status() condition like so:

RequestTimedRefresh( 20, onlyvisible = True ) ;         //      trying to 
reduce CPU load, but this does not stop the "regular" refresh

RAS = Status( "redrawaction" ) ; // 1 if a timed refresh, else 0
if( RAS == 1 ){
   <Complex code here>
}

The goal here is to prevent any "automatic" refreshes, and allow me to specify 
a (much less frequent) TimedRefresh.

What I observe to happen in this case is that the chart paints (quickly) at the 
TimedRefresh frequency, then disappears (goes blank, to the background color) 
until the next TimedRefresh.

So, I'm currently stuck at either seeing the chart and paying the price for 
constant refreshes, or having a flashing/disappearing chart which is useless 
(but cheap!).

Thus the question, in a nutshell:

   How to Draw a Chart Just Once?

(and not have it disappear on you).

Thanks to anyone who can shed some light on this for me!




Reply via email to