Re: Difference between OB Copy and :=

2018-06-14 Thread Cannon Smith via 4D_Tech
Thanks Miyako. I was able to test this this morning and found that it does indeed work in v17! That’s great. Thanks. -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Jun 13, 2018, at 9:21 PM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: >

Re: Difference between OB Copy and :=

2018-06-13 Thread Keisuke Miyako via 4D_Tech
off the top of *my* head I understand the fix is not limited to object notation. it was an optimisation made for wakanda server that somehow got lost on its way to 4D object fields. so it's a fix at the database level. > 2018/06/14 11:54、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> のメール: >

Re: Difference between OB Copy and :=

2018-06-13 Thread Cannon Smith via 4D_Tech
Hi Tim, I haven’t had time to try this myself today, but do you know off the top of your head if this is only fixed when using dot notation? Or is it fixed when for the old style of code as well (when we had to traverse the object tree to the children, getting a reference to the child and then

RE: Difference between OB Copy and :=

2018-06-13 Thread Timothy Penner via 4D_Tech
> However, be aware of a bug in 4D. If you modify a child object in an object > type field and then save the record, the object will not be saved. It is only > saved if you modify a top level key in the object. The workaround, until 4D > fixes this, is to assign the object field to itself

Re: Difference between OB Copy and :=

2018-06-13 Thread Peter Bozek via 4D_Tech
On Wed, Jun 13, 2018 at 3:26 AM, johnbdhPop via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Thanks Cannon, > > So maybe I want to use OB Copy when I load the record in an input > form. That way I can make changes to the object without changing the object > in the field. That way if the user

Re: Difference between OB Copy and :=

2018-06-13 Thread 4dialog via 4D_Tech
There is a good article in knowledgebase that describes this: http://kb.4d.com/assetid=78011 - Hilsen -- Helge Antonsen www.4dialog.no -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html

Re: Difference between OB Copy and :=

2018-06-12 Thread Cannon Smith via 4D_Tech
The neat thing about objects, in my opinion, is that they are reference based. I would try to stay away from using OB Copy unless it is warranted. For example, in your example you could just use the field directly or a reference to the field. Unless you save the record, changes won’t be put

Re: Difference between OB Copy and :=

2018-06-12 Thread johnbdhPop via 4D_Tech
Thanks Cannon, So maybe I want to use OB Copy when I load the record in an input form. That way I can make changes to the object without changing the object in the field. That way if the user cancels I don’t have to worry about the field. When the user saves the record, should

Re: Difference between OB Copy and :=

2018-06-12 Thread Cannon Smith via 4D_Tech
> [Letter Templates]WP_SeriesPictures:=oPictures Both [Letter Templates]WP_SeriesPictures and oPictures point to the same C_Object instance in memory. If you change either one, they are “both” changed. > [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures) [Letter

Difference between OB Copy and :=

2018-06-12 Thread johnbdhPop via 4D_Tech
  What is the difference between the following... [Letter Templates]WP_SeriesPictures:=oPictures [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures) Both work. The LRM for OB Copy speaks to “a complete (deep) copy of the properties”. What does “deep” mean. Thanks, John