I guess the basic examples quite shows it:
clear as mud, sorry
i cannot see the link these indexes has with the actual data or different columns
ID1 is used as a stand-alone 'array.AddIndex(ID1);' - where is the relevance? what does it index?
and again as 'array.AddColumn(ID2, ...).Add(ID1)...' - ID2 seems ok, but what is ID1 doing here?
ID3 just seemingly gets AddIndex()ed to the same column as a 'just because got it' - again relevance?, index to what?
do all three indexes here relate to the still-to-be-added-data in this column, whatever it is?
what data is added to the ValueMap?
looking at 'MyConvert()' doesn't help to clarify
looking at 'IdInfo' in 'ArrayCtrl' doesn't either
array.AddColumn(ID2, "combined").Add(ID1).AddIndex(ID3).SetConvert(Single<MyConvert>());
- multiple indexes to same column - wtf? this throws me completely
array.AddColumn(ID2, "combined").Add(ID1).AddIndex(ID3).SetConvert(Single<MyConvert>());
ID1, ID2, ID3 ALL added to this single column - what am i missing?
in MyConvert you use 0, 1 and 2 as indexes into the ValueArray - what then is the purpose of the named indexes?
ArrayCtrl list; list.AddKey(); // not visible list.AddColumn("Something"); list.Add(1, "One"); list.Add(2, "Two"); list.GoBegin(); ASSERT(list.Get(list.GetCursor(), 0) == 1); ASSERT(list.GetKey() == 1);
ar.AddIndex(); ar.AddColumn(); ar.AddIndex();
int idx=ar.GetCursor(); if (idx>=0) { int first_index=ar.Get(idx, 0); int first_data=ar.Get(idx, 1); int second_index=ar.Get(idx, 2); ... }