On 29 Aug 00 12:23:26 MDT, <[EMAIL PROTECTED]> wrote: Vishy,
you might want to take a look at the way I have implemented the ontimer event in WAPUniverse, an OpenSource (GNU GPL) WAP compliant browser for devices running PalmOS. http://www.wapuniverse.com/ , sources are in CVS: check the runBrowserSate() function in formBrowser.c (approx. line 570), and readElement() in wml.c (approx. line 576) At first sight, it looks like you are not resetting BrowserTimerExists to false once the timer has expired (I might be wrong, since I've only seen some code snippets and not the complete source). Maybe this causes a problem later on in your code ? Filip. WAPUniverse, an OpenSource (GNU GPL) WAP browser for PalmOS. visit http://www.wapuniverse.com/ e-mail: [EMAIL PROTECTED] WAPUniverse is Copyright ©2000 Filip Onkelinx > > >Hi all, > >this is regarding timers in palm (I've been thro the archives) >when I parse and render a WAP card I come accross the ontimer tag..which calls >my createTimer function:- > >BOOL BrowserTimerExists ; >UInt16 BrowserTimeoutValue; > >createTimer(void *usrAgent, uint16 period) > { > > BrowserTimerExists = TRUE; > BrowserTimeoutValue = GetTimeMSec() + period*100; > return SUCCESS; > } > >where GetTimeMSec() returns the time in milliseconds (this function works) > >and then I perform this check in the eventLoop... > > do { > status = CheckTimer(); > EvtGetEvent(&event, 1); > if (! SysHandleEvent(&event)) > if (! MenuHandleEvent(0, &event, &error)) > if (! AppHandleEvent(&event)) > FrmDispatchEvent(&event); > } while (event.eType != appStopEvent); > > > > >Now the above code seems to perform alright and I get the cards rendered on >the screen but at the end when the EvtGetEvent is called after the check timer >it throws up an error : read from Low memory, >Is there something wrong with my timer functions? is there a better way to >implement them?.. > >my CheckTimer function is given by > >CheckTimer() >{ > > if(BrowserTimerExists) > { > if( NW_Time_GetTimeMSec() >= BrowserTimeoutValue){ > return NW_Wml_Timeout(wmlIntepreter); > } > } >} > > > >thanx in advance > >vishy > > > > >____________________________________________________________________ >Get free email and a permanent address at http://www.netaddress.com/?N=1 > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
