Инструменты пользователя

Инструменты сайта


axapta:axapta:таймербезформы

есть два варианта:

  • использование нитей (потоков), например, см. Класс/SysEventHandler/initialize
  • использование Класс/Object/addTimeOut:

Hi

It only works in 3.0. You could make a class with the following methods, and start the class by calling yourclassname.startCheck. You would probably have to do something about the hardcoded 1000 in the method doCheck. (XPP) class yourclassname { Int timeOutHandle; } private void addTimeOut(int _time = 60*60*1000) { ; timeOutHandle = infolog.addTimeOut(this, methodstr(yourclassname, doCheck), _time, false); } void startCheck(int time = 1000) { ; infolog.globalCache().set(classstr(yourclassname), classstr(yourclassname), this); this.addTimeOut(time); } void doCheck() { ; try { // do your thang } catch(Exception::Error) { this.stopCheck(); } this.addTimeOut(1000); } void stopCheck() { ; infolog.globalCache().remove(classstr(yourclassname), classstr(yourclassname)); infolog.removeTimeOut(timeOutHandle); } Regards Jan Stelsig Dahlsgaard Fujitsu DK



AxForum:http://www.axforum.info/forums/showthread.php?s=&threadid=1029

axapta/axapta/таймербезформы.txt · Последнее изменение: 2018/04/04 00:33 (внешнее изменение)