Hi all,

I've the following code written in my MainFormHandleEvent:

// ******************************************
   Int16 winExtent, x;
   char *qwe;
   RectangleType rP;

   WinGetWindowExtent (&winExtent, &x);
   rP.topLeft.x = 0;
   rP.topLeft.y = 30;
   rP.extent.x = winExtent;
   rP.extent.y = 40;

//   for (x=0; x<=10; x++)
   {
    StrIToA (qwe, SysRandom(0));
    WinEraseRectangle (&rP, 0);
    DrawText (qwe, 0, 30);
    SysTaskDelay (SysTicksPerSecond()/10);
   }
// ******************************************

When the program runs with the for loop commented, it works fine. However,
if I uncomment the for loop, after "DrawText"-ing 10 times, the program will
crash with an unspecified error (simply says "Fatal error"). The debugger
said the error is something like an invalid instruction. (BTW, "DrawText" is
a function that draws some text on the screen using WinCopyRectangle from an
offscreen window). What gives????

Regards,
Gee.




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to