you will probably not like my answer, but here goes.

for creating a shared collection from a 4D array,
ARRAY TO COLLECTION has a special syntax that does just that.
the trick is to pass a New shared collection to the command.

http://doc.4d.com/4Dv17/4D/17/ARRAY-TO-COLLECTION.301-3730916.en.html

for objects and collections in general,
there is obviously a need to create a shared copy in one shot,
especially in the context of JSON Parse.

I believe that such feature is in development and will be available pretty soon.

-

but on entity collections, I don't understand why that would be necessary.

first, I disagree with the interprocess named selection analogy.

the request is more like,
"I want to make a query in process B change the current selection of process A, 
and vice versa".
why would you want that?

if an entity selection was shared between processes,
you would have to active its locker mutex,
every time you access it,
 on both sides.

yet,  the "Use" and "End use" locking system would do nothing to protect data 
integrity,
because any other process can update or delete an entity outside of the entity 
selection.
I don't see any value in such a tortured system.

if the goal is to share entity selections between windows,
then it would make more sense to run those windows in the same process.

the scope of an entity selection is the process which has practical benefits.
there must be a really strong argument to justify breaking that rule.

> 2018/10/21 17:17、Peter Bozek <peter.bo...@gmail.com>のメール:
> is there a way how to convert non-shared collection to shared? Some commands 
> return normal collection, like
> selection.toCollection("ID") or collection:=selection.ID
> and I want to pass the collection to other process without duplication, but 
> have not found a way how to convert normal selection to shared one.




**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to