> So it looks like you can’t .push() a shared object onto a shared collection.

not quite.

a shared object is either single (solo) or multiple (once belonged to a group)
if an object joins a group, it is free to leave it, but it can't join another 
group.

i.e. once you divorce your spouse,
you can be single for the rest of your life,
or remarry the same person. (bad analogy)

anyway,

in your case, the problem is that you add $sharedObj to $catalogObj,
then $catalogObj to Storage.

if you reverse the order, that is,
add $catalogObj to Storage first,
then $sharedObj to $catalogObj later,
it should work.

> 2019/09/10 13:13、Jim Crate via 4D_Tech <[email protected]>のメール:
>
> So what doesn’t work is:
>
> $sharedObj:=New Shared Collection
> OB_CopyToSharedObject ($catalogObj;$sharedObj)
> Use (Storage.MySharedCollection)
> Storage.MySharedCollection.push($sharedObj)
> End use
>
>
> What does work is:
>
> Storage.MySharedCollection.push(New shared object)
> Use (Storage.MySharedCollection[Storage.MySharedCollection.length-1])
> OB_CopyToSharedObject 
> ($catalogObj;Storage.MySharedCollection[Storage.MySharedCollection.length-1])
> End use



**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to