// This example is provided 'AS IT' // I hope that it will be useful, but WITHOUT ANY WARRANTY. // // By Iri - april 2014. // Web : http://www.scolring.org /* Dependancies to run this example : _load "lib/2dos/bitmap.pkg" _load "lib/2dos/working.pkg" */ typeof win = ObjWin;; typeof text = ObjText;; var number = 0;; fun cbEnd (o, p)= lib2d_workingDestroy; lib2d_statusDestroy; _closemachine;; fun cbChange (n)= lib2d_statusChange number; _SETtext text itoa number; set number = if number > 100 then 0 else number+1; 0;; fun main ()= _showconsole; set win = _CRwindow _channel nil 0 0 300 200 WN_NORMAL " Working"; _CRtext _channel win 5 5 290 20 ET_BORDER|ET_ALIGN_CENTER "... working in progres ..."; set text = _CRtext _channel win 5 55 290 20 ET_ALIGN_CENTER "0"; lib2d_workingSetPeriod 100; let lib2d_workingNew win 112 82 -> res in _fooS if !res then "Success !" else strcat "Error : " itoa res; lib2d_workingSetCallback @cbChange; let lib2d_statusNew win 152 82 -> res in _fooS if !res then "STATUS Success !" else strcat "STATUS Error : " itoa res; _CBwinDestroy win @cbEnd 0; 0;;