Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
2dos/working.pkg_
.// 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)=
. _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;;
Generated on Sat Jan 31 2015 19:15:41 for Scol standard library package by 1.8.1.2