Re: Convert Object to shared object.

2020-03-06 Thread Eric Naujock via 4D_Tech
Thanks, That helped a lot. > On Mar 5, 2020, at 3:49 PM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > https://kb.4d.com/assetid=78197 ** 4D Internet Users Group (4D iNUG) Archive:

Re: Convert Object to shared object.

2020-03-05 Thread John DeSoi via 4D_Tech
ve found that nothing > seems to want to allow an easy conversion from a c_object type to a shared > object. Though in reality what I really want to do is convert a collection of > objects to a shared collection of objects

Convert Object to shared object.

2020-03-05 Thread Eric Naujock via 4D_Tech
Does anyone know of a way to simply convert an object to a shred object. I have tried numerous methods to get this done but I have found that nothing seems to want to allow an easy conversion from a c_object type to a shared object. Though in reality what I really want to do is convert

Re: Stuffing a shared object

2019-07-16 Thread Jeremy Roussak via 4D_Tech
Thanks, Keith. I had wondered about writing a method to copy each element of the non-shared object into the shared object, but couldn’t believe that there wasn’t a simpler way of doing it - hence my question. Clearly, I was wrong. Jeremy > On 16 Jul 2019, at 09:14, Keith White via 4D_T

RE: Stuffing a shared object

2019-07-16 Thread Keith White via 4D_Tech
Hi I know you've sorted out an elegant solution using CALL WORKER, but just in case you do need to copy to a shared object or collection in the future, please see https://kb.4d.com/assetid=78197 Best regards Keith White Synergist Express Ltd, UK. 4697775

Re: Stuffing a shared object

2019-07-15 Thread Jeremy Roussak via 4D_Tech
or, >> isn’t it? >> >> Jeremy >> >>> On 15 Jul 2019, at 16:44, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >>> >>> Jeremy, >>> I don't think this would be a good situation for using Shared objects.

Re: Stuffing a shared object

2019-07-15 Thread Kirk Brooks via 4D_Tech
hat CALL WORKER is for, > isn’t it? > > Jeremy > > > On 15 Jul 2019, at 16:44, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > > > Jeremy, > > I don't think this would be a good situation for using Shared objects. > > Every object in a shared ob

Re: Stuffing a shared object

2019-07-15 Thread Jeremy Roussak via 4D_Tech
uming calculations which return a set of >> figures. At present, it uses objects with the Form object for input and >> output data. >> >> I’d like to hand off the calculations to a separate process. As I >> understand it, I can’t pass the Form object to the new p

Re: Stuffing a shared object

2019-07-15 Thread Kirk Brooks via 4D_Tech
Jeremy, I don't think this would be a good situation for using Shared objects. Every object in a shared object must itself be shared. There's a lot of overhead involved in maintaining the various lockers and such. I would look at using CALL WORKER. Bundle up everything into an object and pack

Stuffing a shared object

2019-07-15 Thread Jeremy Roussak via 4D_Tech
understand it, I can’t pass the Form object to the new process but have to create a shared object. How do I get the information from the Form object into the new shared object? I’ve tried $shared.formObj := OB Copy(Form) but it gives a error: “Not supported value in a shared object

Re: Shared Object - NOT!

2018-10-22 Thread Peter Bozek via 4D_Tech
On Mon, Oct 22, 2018 at 5:10 PM Keith Culotta via 4D_Tech < 4d_tech@lists.4d.com> wrote: > If a method creates an object ($no:=new object), the object is destroyed > when the method ends? > and > if a method creates a new shared object ($nso:=new shared object), the > obje

Re: Shared Object - NOT!

2018-10-22 Thread Keith Culotta via 4D_Tech
If a method creates an object ($no:=new object), the object is destroyed when the method ends? and if a method creates a new shared object ($nso:=new shared object), the object continues to exist after the method ends, but the reference to it is lost? Does 4D know to clear the object

Re: Shared Object - NOT!

2018-10-21 Thread Peter Bozek via 4D_Tech
On Sun, Oct 21, 2018 at 7:36 PM Kirk Brooks via 4D_Tech < 4d_tech@lists.4d.com> wrote: > > > Personally I have a lot of concepts about how to do code operation in 4D > that are strongly rooted in what it was possible to do in 4D. ORDA > frequently goes in a different direction and the optimal

Re: Shared Object - NOT!

2018-10-21 Thread Keisuke Miyako via 4D_Tech
it's a silly example anyway, but to be clear, cat:=New collecrtion(cat;cat;cat) cat[0].food:="prawn" should read cats:=New collection(cat;cat;cat) and cats[0].food:="prawn" ** 4D Internet Users Group (4D iNUG) Archive:

Re: Shared Object - NOT!

2018-10-21 Thread Keisuke Miyako via 4D_Tech
the sharing of process sets and named selections between a client process and its server twin process seems to me like a very deliberate feature. http://doc.4d.com/4Dv15/4D/15.6/4D-Server-Sets-and-Named-Selections.300-3838966.en.html for those who are not familiar with this feature, a process

Re: Shared Object - NOT!

2018-10-21 Thread Kirk Brooks via 4D_Tech
Peter, On Sun, Oct 21, 2018 at 5:04 AM Peter Bozek via 4D_Tech < 4d_tech@lists.4d.com> wrote: > On Sun, Oct 21, 2018 at 12:41 PM Keisuke Miyako via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > > the request is more like, > > "I want to make a query in process B change the current selection of > >

Re: Shared Object - NOT!

2018-10-21 Thread Kirk Brooks via 4D_Tech
Miyako, On Sat, Oct 20, 2018 at 9:29 PM Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > if you do the same across processes, > i.e. pass a New object or New collection to New process, CALL WORKER or > CALL FORM, > the object or collection is not shared between the 2 methods, caller

Re: Shared Object - NOT!

2018-10-21 Thread Chip Scheide via 4D_Tech
Not to mention how much old/legacy code would likely break > > the language might be more consistent if 4D got rid of all native > scalar types and treating everything as an object, > but there is a performance advantage (memory footprint and speed) in > having scalar native types.

Re: Shared Object - NOT!

2018-10-21 Thread Keisuke Miyako via 4D_Tech
or is not inconstant. what is really "inconsistent", is the nature of value types. assigning an object or collection to another is like assigning a DocRef (time), MenuRef (string), XMLRef (string), List (number) to another. the operator never created a new file pointer, menu, XML node o

Re: Shared Object - NOT!

2018-10-21 Thread Peter Bozek via 4D_Tech
On Sun, Oct 21, 2018 at 12:41 PM Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > 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

Re: Shared Object - NOT!

2018-10-21 Thread Keisuke Miyako via 4D_Tech
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

Re: Shared Object - NOT!

2018-10-21 Thread Peter Bozek via 4D_Tech
On Sun, Oct 21, 2018 at 6:29 AM Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > > the best way to share an object or collection between processes is to pass a shared object or shared collection as a parameter. > there is no need to use Storage, there is no need to u

Re: Shared Object - NOT!

2018-10-20 Thread Keisuke Miyako via 4D_Tech
e, because they are not running in the same process. the best way to share an object or collection between processes is to pass a shared object or shared collection as a parameter. there is no need to use Storage, there is no need to use interprocess variables. you just create a shared object or shared

RE: Shared Object - NOT!

2018-10-20 Thread lists via 4D_Tech
Hi Pat, In order to share an object between processes without using an interprocess variable, you must use the "Storage" container/catalog. In your startup: Use(Storage) Storage.TriggerState:= New shared object End use Later in your subsequent code, you assign the contents:

Re: Shared Object - NOT!

2018-10-20 Thread Christian Sakowski via 4D_Tech
Hi Pat, > But I get an error because $objTriggerState is undefined. This cannot be true, because you used New shared object. Please use the debugger and check your code. I suppose you are using the latest v17 build and you have dot-notation turned on. -- Grüße/Regards, [heubach-me

Re: Shared Object - NOT!

2018-10-20 Thread Pat Bensky via 4D_Tech
gt; > On 20 Oct 2018, at 15:50, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > > > Well I guess I must be doing something wrong :) > > Using v17r3: > > > > In the Startup method I create a new Shared Object: > > > > *C_OB

Re: Shared Object - NOT!

2018-10-20 Thread Paul Lovejoy via 4D_Tech
How could it be shared between processes with a name starting with $? Paul > On 20 Oct 2018, at 15:50, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote: > > Well I guess I must be doing something wrong :) > Using v17r3: > > In the Startup method I cr

Shared Object - NOT!

2018-10-20 Thread Pat Bensky via 4D_Tech
Well I guess I must be doing something wrong :) Using v17r3: In the Startup method I create a new Shared Object: *C_OBJECT*($objTriggerState) // 20/10/18 $objTriggerState:=*New shared object*() Subsequently I want to add something to that object. $State:="on" *Use* ($objTr

Re: Storage + New shared object

2018-09-02 Thread Keisuke Miyako via 4D_Tech
typo: $a.prop:="whatever" you can simply $a:="whatever" ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub:

Re: Storage + New shared object

2018-09-02 Thread Keisuke Miyako via 4D_Tech
as others have correctly pointed out, each sub-object or sub-collection you add to a shared object must themselves be shared objects or shared collection. regarding object notation: if you do something like $a:=New shared object $b:=New shared object("a";$a) then there

Re: Storage + New shared object

2018-09-02 Thread Kirk Brooks via 4D_Tech
*($DeleteRecord_PN_ob) $DeleteRecord_PN_ob:=*New shared object* *C_OBJECT*($Delete_ob;$Delete_PN_ob) $Delete_ob:=*New shared object* $Delete_PN_ob:=*New shared object* *Use* (*Storage*) *Storage*.t:=*New shared object*("DeleteRecord";$Delete_ob ;"DeleteRecord_PN";$Delete_PN_ob) *End use

Re: Storage + New shared object

2018-09-02 Thread Christian Sakowski via 4D_Tech
ts.4d.com>: > > I’m trying to add an object array to Storage. > > The documentation says that Objects can be a share storage value. > > I keep getting the message “Not supported value type in a shared object or > shared collection.” > > In the below code I broke apar

RE: Storage + New shared object

2018-09-01 Thread lists via 4D_Tech
End use Lahav -Original Message- From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of David Ringsmuth via 4D_Tech Sent: Saturday, September 1, 2018 9:36 PM To: 4D iNug Technical <4d_tech@lists.4d.com> Cc: David Ringsmuth Subject: Storage + New shared object I’m trying t

Storage + New shared object

2018-09-01 Thread David Ringsmuth via 4D_Tech
I’m trying to add an object array to Storage. The documentation says that Objects can be a share storage value. I keep getting the message “Not supported value type in a shared object or shared collection.” In the below code I broke apart the assignments for easiest debugging. ARRAY TEXT