flowServe function
-
- This is main f-Print, that handles all flowC call from every library.
Do not look out unprofessionally and spam your code with print-clauses!
Instead use: flow !!
DONE: To avoid messing with buffer and actor HOORAY: used local flowC().
ALL local flowC() calls this flowServe()
Implementation
// Actor and buf are not needed in parameter !! They are get from caller.
// void flow(String actor, StringBuffer buf, String msg, bool pr)
/// DONE: To avoid messing with buffer and actor HOORAY: used local flowC().
/// ALL local flowC() calls this flowServe()
void flowServe(String actor, StringBuffer buf, String msg, bool pr) {
/// ********************************************************************
/// GETTING NOW ACTOR AND BUFFER RIGHT, WHEN USED LOCAL fl()
/// **********************************************************************
// TODO : is flow pushing empty rows to buffers?
// hklTry, add :FS:
// Handle flow-counter, flowI
flowI++;
String flowIS = flowI.toString();
/// Added opC: to flow-counter for easy search.
String _flowIS = 'opC:$flowIS';
String header = 'fs:'; // $pr: If want true / false.
String text = '$actor$header$_flowIS $msg ';
// Try checking that value is not NULL, before using it in a condition
// && glb.st['flow'] / Shortens output from 24 to 22 screens.
// HowTo NULL Condition OK
// howTo NULL error: a nullable expression can't be used as a condition
// if (pr && glb.prSt['flow']) print(text); // When needed :flowServe:test:
if (pr && glb.prSt['flow']!) print(text); // When needed :flowServe:test:
// DONE: Now _buf comes from caller in parameters.
buf.writeln('$text');
// buf.writeln('$actor $_flowIS $msg');
// Code here.
// Form nice String (for print and/or buf) that describes ongoing operation.
}