Order of the Butterfly
Posts: 265 from 2006/8/31
Quote:r-tea wrote:
I tried to make a simple digital clock using MUI window, but the result has a strange issue. The method SetAsString, which updates the text gadget displaying clock digits, stops updating right after I deactivate the window and remove the mouse pointer from over the window.
Below is part of the loop.
Code:
while (running)
{
time(&ptr_sec); //// gets data for digital clock
h = localtime(&ptr_sec)->tm_hou
m = localtime(&ptr_sec)->tm_min;
s = localtime(&ptr_sec)->tm_sec;
DoMethod(tx_clock, MUIM_SetAsString, MUIA_Text_Contents, "%02d:%02d:%02d", h, m, s);
At First: Never Write anything in this Loop.
Use notyfies .
If you wish to build a clock , use window events and a trigger .
Read the mui Tutorials in the Sdk.
Spreedy - The spreedsheet editor of MorphOS
Calimero - Do you know about the new DTP Program for MorphOS ?