| |||||||||||||||||||||||||||||||
|
is it maybe safe to call clearInterval(0) (same way as calling free(NULL) in C language) or should I better not rely on this? Here is my web chat function and I wonder if I could get rid of the very first line in it: var intervalID:Number = 0; var resp_lv:LoadVars = new LoadVars(); var req_lv:LoadVars = new LoadVars(); function fetch(event_num:Number, args:String):Void { if (0 != intervalID) /* XXX remove this check? */ clearInterval(intervalID); req_lv.event = event_num; if (args != undefined) req_lv.args = args; else delete req_lv.args; req_lv.sendAndLoad(MODULE_URL, resp_lv, 'GET'); intervalID = setInterval(fetch, 10 * 1000, ALIVE); } Regards Alex -- http://preferans.de _______________________________________________ Flashcoders To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com