Value FormatConvert::Format(const Value& v) const { ValueArray va; if(IsValueArray(v)) va = v; else va.Add(v); return UPP::Format(format, va.Get()); }
void ValueArray::Insert(int i, const ValueArray& va) { if(va.data == data) { ValueArray va2 = va; Clone().Insert(i, va2.Get()); } else Clone().Insert(i, va.Get()); }
void PropListCtrl::Updated() { gl.SetData(Null); sl.SetData(Null); if(!ctrl) return; Ctrl& e = *ctrl; Value v; bool b; String t; b = Props<Ctrl>::Get(e, "listset", v); ValueArray vs = v; t << "Set Properties: (" << vs.GetCount() << ")\n" << v; gl.SetData(t); v = Value(); b = Props<Ctrl>::Get(e, "listget", v); t.Clear(); ValueArray vg = v; t << "Get Properties: (" << vg.GetCount() << ")\n"; { for(int i = 0; i < vg.GetCount(); i++) { String s = vg.Get(i); Value v; t << s << " = "; b = Props<Ctrl>::Get(e, s, v); if(b) t << v; else t << "##ERR##"; t << "\n"; } } sl.SetData(t); }
String AsString(const ValueArray& v) { return sAsString(v.Get()); }