On Wed, Nov 1, 2017 at 2:17 AM, Keisuke Miyako via 4D_Tech <
[email protected]> wrote:

>
> to explicitly indicate that the object has been modified, just use the line
>
> [myTable]myObjectField:=[myTable]myObjectField
>

YEs, I use wrapper around SAVE RECORD, so can put there

Field($passedTable;1)->:= Field($passedTable;1)-->

Clumsy, but will work.


> and you have total control of when to save the field,
> which results in better performance, immediately as well as in the long
> term.
>
> to me this sounds like a better deal than a blanket "save always" system
> (the real sloppy design choice, in my opinion)
>
>
I undertand this dilemma, it is well understood from other email in this
thread:

a direct assignment
via dot notation
via set object
via set (sub)object
via martians landing in Washington D.C

it should NOT matter how the modification occurred - a modification
occurred - save the change(s) if requested <period>.



"Set via subobject" means something like
$subObject:=OB GET([Table]ObjectField;"subobject";is object)
subObject.property:="value"

or, in one line
OB SET(OB GET([Table]ObjectField;"subobject";is object);"property";"value")

Now, it is quite difficult to argue that this should set modifier flag to
true, even if it modifies object field (lazy to test, but I gather it would
not, so the point is moot.)

Problem is different: if developer modifies record and calls SAVE RECORD,
he awaits that the record is saved. If it means that records is saved when
it does not need to be, so be it. If the records is not saved when it needs
to be, it is a bug, not sloppy design choice (although understandable
sloppy design choice.)

--

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

Reply via email to