Memrec Group's Children Indexing / Group Options
Posted: Thu Aug 19, 2021 9:17 am
Trying to write up some freeform functions I can pull from, but I'm not sure how to change the Index of children.. I see that you have access to a memrec's Index as read-only, and you can access a group's children via Child[index].
So.. how would I change a child's index under a group? Using appendToEntry() always puts it at the bottom of the group, and I'd like more control over that.
Currently I've just got this, but it doesn't work because the Index field is read-only, I'm guessing.
I also fail to understand the
I figured it was something like this, but no dice.
So.. how would I change a child's index under a group? Using appendToEntry() always puts it at the bottom of the group, and I'd like more control over that.
Currently I've just got this, but it doesn't work because the Index field is read-only, I'm guessing.
Code: Select all
local function childAppend(memDesc, parent)
local al=getAddressList()
for i=0,al.Count-1 do
if al[i].Description == parent then
trueParent = al[i]
end
end
for i=0,al.Count-1 do
if al[i].Description == memDesc then
al[i].appendToEntry(trueParent)
end
end
local TPCC = trueParent.Count -- Stores the index of the newly appended memrec
trueParent[TPCC].Index = 0 -- Desired effect, anyway.. move the index/order of children.. can be expanded upon but I need this first
end
-- trueParent.Child[TPCC].Index = 0 also doesn't work, presumably for the same reason?
Options
property.. The wiki's small example doesn't really do it for me I guess.I figured it was something like this, but no dice.
Code: Select all
Group.Options = [moHideChildren,moDeactivateChildrenAsWell]