Hello friends,
I am confused with application running on device please help me if possible.
In my application I am reading article say about 2000 words line by
line,user will set no. of word per line he want to read and speed of
reading i.e. how many such line should be display with in a second .so now
suppose user select 6 word and 2 lines to be flash with in a second then
with in a second he will read 12 words that mean 2 lines.
No when i run this on emulator it run very smoothly it display me 2 line
each of 6 word with in a second every time ,but when I run same thing on
palm 100 device it will give problem some time it won't display all six word
only display 2 or 1.Funny thing is my counter of word always update properly
because when time is over to display current line it will call method to
get another words for generating new line and that time it take last word
count value +1 then why I am getting this problem in display on device.
same thing works fine in emulator.I am using same rom file which is transfer
from device in emulator.
I am using nilEvent to refresh timer.
Please help me to find out this I am totaly hang up.If possible send me code
snippet which will handle this refreshing things.
here I am attaching my code snippet
****************************************************************************
****************************
UInt32 NilEventTicks = 0;
UInt32 HideTextTicks;
void ProduceNilEventAt(UInt32 ticks)
{
if (NilEventTicks == 0 || NilEventTicks > ticks)
NilEventTicks = ticks;
}
static void InitTimer()
{
// FrmCustomAlert(MyAlertAlert,"","","");
HideTextTicks = TimGetTicks() + (SysTicksPerSecond()/(set3+1));
ProduceNilEventAt(HideTextTicks);
// FrmCustomAlert(MyAlertAlert,"here","","");
}
static void AppEventLoop(void)
{
UInt16 error;
EventType event;
UInt32 now;
Int32 timeout;
do {
if (NilEventTicks == 0)
timeout = evtWaitForever;
else
{
now = TimGetTicks();
timeout = NilEventTicks > now ? NilEventTicks - now : 0;
}
EvtGetEvent(&event, timeout);
if (event.eType == nilEvent)
NilEventTicks = 0;
if (! SysHandleEvent(&event))
if (! MenuHandleEvent(0, &event, &error))
if (! AppHandleEvent(&event))
FrmDispatchEvent(&event);
} while (event.eType != appStopEvent);
}
code in form handler
case nilEvent:
if ( (set3+1) != 0)
{
InitTimer(); //commented
here**********
}
if (HideTextTicks != 0 )//&& TimGetTicks() >=
HideTextTicks)
{
//
ProduceNilEventAt(HideTextTicks);
// following method parse string and
store value in a varible which is
display
parseString();
}
// handled = true;
break;
****************************************************************************
****************************
Thanx and regards,
Ravi
--------------------------------------------------------------
Nova Software, Mumbai, India
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/