getValue method

bool getValue(
  1. TIntRef aValue
)

Implementation

bool getValue(TIntRef aValue) {
  final buf = TValueBuffer();
  final result = getData(buf);
  if (result) {
    final v = buf.value;
    if (v is int) {
      aValue.value = v;
    } else if (v is num) {
      aValue.value = v.toInt();
    } else if (v is String) {
      aValue.value = int.tryParse(v) ?? 0;
    }
  }
  return result;
}