"TheEndless" wrote:
The only way I've found to do that is to set assocarray as the field type, then add your variant/dynamic array to a single element AA. Hacky, but...
For posterity, an illustration of above workaround idea (copied
from here😞' you cant have this: '
myNode.addFields({ myField: [1, 2, 3] })
' however, you can cheat and do this just fine: '
myNode.addFields({ myField: {bless_RSGs_maker: [1, 2, 3]} })
"TheEndless" wrote:
The preferred/recommended way would be to use ContentNodes instead of AAs.
Not really/not anymore though. First, there are indications the Co will be adding (begrudgingly 8-)) direct support for roArray fields in future firmware, so for my money the above hack is better since can be easily changed to the sane way when available.
And second, if one really wants to use a node as container for a list of ContentNodes, at least use an instance of the parent class
Node and not another
ContentNode - both are equally privileged re thread ownership. The difference being Node does not have all the content-metadata fields junk ("junk" for our specific purpose as container here, not in general).