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)=
. _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";
. let lib2d_workingNew win 112 82 -> res in
. _fooS if !res then "Success !" else strcat "Error : " itoa res;
. 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;;