Re: Serious 4D Internet commands issue in v15.4 with SMTP on Mac OS X

2017-07-25 Thread Robert McKeever via 4D_Tech
I’d check the text with a hex editor to look for invisible characters, etc.

> On Jul 25, 2017, at 9:36 PM, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> It seems this does not do the trick in all instances.
> 
> It appears there may be a problem with the text in the fields. I exported to 
> text and everything looks fine but some texts truncate with a “?” when the 
> email is sent. I have re-typed some of the offending texts and they work 
> fine. The strange thing is they are identical, character-to-character, to the 
> texts that are truncating in the emails. Could it be something to do with a 
> length byte or something else that 4D stores along with the text in the 
> fields?
> 
> Cheers,
> 
> 
> Paul
> 
>> 
>> 
>> Hi again,
>> 
>> I just commented out the lines
>> 
>> $err:=SMTP_SetPrefs (1;1;0)
>> $err:=SMTP_Charset (1;1)
>> 
>> and it appeared to solve the problem. So it would appear the internet 
>> commands' default behavior is different in v15.
>> 
>> Thanks!
>> 
>> 
>> Paul
>> 
>>> Le 24 juil. 2017 à 14:19, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com 
>>> > a écrit :
>>> 
>>> What character set are you using?
>>> 
 On Jul 24, 2017, at 7:33 AM, Paul Lovejoy via 4D_Tech 
 <4d_tech@lists.4d.com > wrote:
 
 The mails are sent to the desired destination  but the subject and the 
 body are often truncated, with a “?” at the end of the subject or body 
 where the rest of the text should be. In most cases, the texts are 
 generated automatically from records in the database. The subject and body 
 are generated automatically. 
>>> 
>>> **
>>> 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:4d_tech-unsubscr...@lists.4d.com 
>>> 
>>> **
>> 
> 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **

_
Bob McKeever  http://www.mswl.com 
McKeever's Software Wizardry
Port Coquitlam, B.C.
bobmckee...@mac.com




**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Serious 4D Internet commands issue in v15.4 with SMTP on Mac OS X

2017-07-25 Thread Paul Lovejoy via 4D_Tech
It seems this does not do the trick in all instances.

It appears there may be a problem with the text in the fields. I exported to 
text and everything looks fine but some texts truncate with a “?” when the 
email is sent. I have re-typed some of the offending texts and they work fine. 
The strange thing is they are identical, character-to-character, to the texts 
that are truncating in the emails. Could it be something to do with a length 
byte or something else that 4D stores along with the text in the fields?

Cheers,


Paul

> 
> 
> Hi again,
> 
> I just commented out the lines
> 
>  $err:=SMTP_SetPrefs (1;1;0)
> $err:=SMTP_Charset (1;1)
> 
> and it appeared to solve the problem. So it would appear the internet 
> commands' default behavior is different in v15.
> 
> Thanks!
> 
> 
> Paul
> 
>> Le 24 juil. 2017 à 14:19, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com 
>> > a écrit :
>> 
>> What character set are you using?
>> 
>>> On Jul 24, 2017, at 7:33 AM, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com 
>>> > wrote:
>>> 
>>> The mails are sent to the desired destination  but the subject and the body 
>>> are often truncated, with a “?” at the end of the subject or body where the 
>>> rest of the text should be. In most cases, the texts are generated 
>>> automatically from records in the database. The subject and body are 
>>> generated automatically. 
>> 
>> **
>> 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:4d_tech-unsubscr...@lists.4d.com 
>> 
>> **
> 

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: LOG File TO JSON - How does it name the files

2017-07-25 Thread Keisuke Miyako via 4D_Tech
just set the size to "1" and see for yourself:

$path:=System folder(Desktop)
LOG FILE TO JSON($path;1)

I got

JournalExport.json
JournalExport2.json
...
JournalExport10.json

so there is not underscore.

> 2017/07/26 7:09、Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> Does anyone know how it names the extra files that it creates?
>
> eg:
> JournalExport.json
> JournalExport_1.json
> JournalExport_2.json



**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread John DeSoi via 4D_Tech

> On Jul 25, 2017, at 6:02 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> So why not BLOBs? Why not pictures, or text variables? Why does C_OBJECT 
> flaunt the limited scoping abilities we have in 4D? The only reason I can 
> think of is because an object can contain references to other other objects, 
> and it would get really hard to explain what to do with all the parent object 
> references if a child object 10 layers deep got modified.


Also note that when objects referencing other objects have a cycle (the same 
object included in more than one path) strange performance issues popup. The 
execution time for the method below increases 40 times when a cycle is added. 
Tested 15.4 Mac.

John DeSoi, Ph.D.



C_BOOLEAN($1;$executeBug)

If (Count parameters>=1)
$executeBug:=$1
Else 
$executeBug:=True
End if 


C_LONGINT($iCol;$iRow;$rowCount;$ms;$fast;$slow;$total)
C_OBJECT($oCursor;$oAllRows;$oRow;$oName)

$colCount:=5
ARRAY OBJECT($aCol;$colCount)

For ($iCol;1;$colCount)
OB SET($aCol{$iCol};"name";"name "+String($iCol);"number";$iCol)
End for 
OB SET ARRAY($oCursor;"columns";$aCol)

$rowCount:=3000
For ($iRow;1;$rowCount)
CLEAR VARIABLE($oRow)
For ($iCol;1;$colCount)
OB SET($oRow;String($iCol);String($iCol))
End for 
OB SET($oAllRows;String($iRow);$oRow)
End for 

OB SET($oCursor;"rows";$oAllRows)
$oAllRows:=OB Get($oCursor;"rows")

$fast:=MAXLONG
$slow:=0
$total:=Milliseconds

For ($iRow;1;$rowCount)
$ms:=Milliseconds
$oRow:=OB Get($oAllRows;String($iRow))
$ms:=Milliseconds-$ms
If ($ms<$fast)
$fast:=$ms
End if 
If ($ms>$slow)
$slow:=$ms
End if 

  //If this is executed, access on $oAllRows starts taking up to 40 
times longer.
If ($executeBug & ($iRow=100))
For ($iCol;1;$colCount)
OB SET($oName;OB Get($aCol{$iCol};"name");$aCol{$iCol})
End for 
OB SET($oCursor;"names";$oName)
End if 

End for 

$total:=Milliseconds-$total

ALERT(String($total)+" ms, range "+String($fast)+"-"+String($slow))

If (Count parameters=0)
EXECUTE METHOD(Current method name;*;False)
End if 


**
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:4d_tech-unsubscr...@lists.4d.com
**

Question about building an installer

2017-07-25 Thread Kirk Brooks via 4D_Tech
So I'm getting around to building an installer for 4D on client machines.
we're talking windows here.  I just want to verify that there's not fancy
registry magic that's required if I unzip the 4D app into the programs
file. I know 4D has always just configured itself in the past - is that
still true?

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Kirk Brooks via 4D_Tech
On Tue, Jul 25, 2017 at 4:54 PM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hmmm. Well, 4D's tools for manipulating JSON are sub-standard, if your goal
> is to parse/produce JSON freely. In this respect, the XML tools (external
> libraries built into 4D) are far more standard and comprehensive.
>
​I hear you say that a lot but I don't agree. For me they have been quite
adequate. I haven't had any issue parsing or producing JSON from c-objects
or back again. Having said that it seems I'm not using c-objects is some of
the esoteric ways others appear to be. For me they have opened up great
ranges of possibilities and made interacting with web apps much easier and
faster.

And now that I have a fuller grasp of exactly how they are referenced I see
even more potential.

So, a tick on the interesting new features but no tick on basic JSON
> support. For that, you need NTK.
>
​Well one thing you can't currently do with NTK is update a single key in a
nested object. I discovered this while trying to replicate the commands
from Cannon's component in a v13 db using NTK. I'm using NTK for json quite
a lot in that database. I do like the way I can access array objects using
NTK. And being able to add items directly to an array without having to
un-pack it from the object is nice. But on the whole I find 4D's c-objects
easier to deal with on the fly, as it were. In another project where I'm
using NTK for HTTP comms for example.

What can you only do with NTK you can not do with 4D c-objects?

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread David Adams via 4D_Tech
Kirk,

Hmmm. Well, 4D's tools for manipulating JSON are sub-standard, if your goal
is to parse/produce JSON freely. In this respect, the XML tools (external
libraries built into 4D) are far more standard and comprehensive.

The 4D-specific features of C_OBJECT (like pointer resolution and so on)
are nice and full of potential.

So, a tick on the interesting new features but no tick on basic JSON
support. For that, you need NTK. It's a pity and completely baffling to me.
But I guess I'm easily baffled or something.
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Kirk Brooks via 4D_Tech
On Tue, Jul 25, 2017 at 4:02 PM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> So why not BLOBs? Why not pictures, or text variables? Why does C_OBJECT
> flaunt the limited scoping abilities we have in 4D?

​
I think it has to do with the c-object being brought about ​from figuring
out how to handle JSON. Blobs and pictures and text vars all conform more
or less to the way 4D has conceptualized data objects pretty much forever
from my perspective. And 4D-land pretty much eschewed really embracing any
alternatives (which is why it's so much fun to use XML in 4D). Not to get
all shrinky about this but I feel that had Laurent not made the detour into
Wakanda and immersed himself in javaScript for a while our tools for JSON
would be on par with the ones for XML. The c-object is stretching 4D
conceptually and technically. From what I've heard at the Summits and such
it's changing the way 4D is built internally. So it seems likely to me this
is the future of 4D being worked out. I don't think it's a bad thing.
Frankly I think being able to manipulate JSON pretty much directly in 4D is
fabulous. Of course I've demonstrated I'm not big on the internal
architecture involved but as a user and developer I think it's pretty cool.
I'm just trying to really ground my understanding of the fundamentals so I
don't start engineering in ideas that will blow up on me in a year or two.

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Bug with Open Document on macOS Sierra

2017-07-25 Thread David Adams via 4D_Tech
On Wed, Jul 26, 2017 at 9:04 AM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks for the heads up. This was going to be the #1 project after
> upgrading to v16... creating workers to handle logging.
>

Yeah, CALL WORKER is the *perfect* design for this, unless you can't afford
to lose log entries. The existing bug, very sadly, makes it a non-starter.
A reliable approach with the same design is to use NTK IPC channels  Just
have one process read the log entries and keep the logs open on disk. 20x
faster (not a made up number, by YMMV) than having your processes fight
over a file lock. Another alternative is to push everything to an external
logging service via HTTP, etc. I think that you were already looking at the
STOMP plug-in form Miyako, and that opens up a lot of possibilities right
there.

It depends a lot on what you need from your logs and what trade-offs you
can make. Ping me privately if you want to chat about logs. Or not...but
then I'll have to hurt you. I love custom logs. So much. I'll stop
now...but you've been warned ;-)
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread David Adams via 4D_Tech
On Wed, Jul 26, 2017 at 9:02 AM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> So why not BLOBs? Why not pictures, or text variables? Why does C_OBJECT
> flaunt the limited scoping abilities we have in 4D? The only reason I can
> think of is because an object can contain references to other other
> objects, and it would get really hard to explain what to do with all the
> parent object references if a child object 10 layers deep got modified.
>

No clue. But I figure that I've used up my quota for 2017 for complaining
about the 4D language. So, now it's up to you ;--) I am with you on the
lack of comprehensive documentation. That's pretty much inexcusable and
definitely *not* industry standard. Deep, detailed technical docs are the
baseline for anything to do with coding these days. Bar. Not. Cleared.
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Bug with Open Document on macOS Sierra

2017-07-25 Thread Jeffrey Kain via 4D_Tech
Thanks for the heads up. This was going to be the #1 project after upgrading to 
v16... creating workers to handle logging.

--
Jeffrey Kain
jeffrey.k...@gmail.com

> On Jul 25, 2017, at 7:01 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> It took me about 15 minutes to stumble across that bug the first time I
> tried CALL WORKER to try and implement a centralized log writer, a perfect
> match for CALL WORKER. Unless you need to roll your logs. Then, not so much.

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Jeffrey Kain via 4D_Tech
So why not BLOBs? Why not pictures, or text variables? Why does C_OBJECT flaunt 
the limited scoping abilities we have in 4D? The only reason I can think of is 
because an object can contain references to other other objects, and it would 
get really hard to explain what to do with all the parent object references if 
a child object 10 layers deep got modified.

--
Jeffrey Kain
jeffrey.k...@gmail.com




> On Jul 25, 2017, at 6:57 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Is that potentially confusing? Can it lead to hard-to-figure-out bugs? Yes
> and yes. Is it a reasonable thing to do in a language? Most every language
> that I've ever looked at thinks so, so why not 4D?

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Bug with Open Document on macOS Sierra

2017-07-25 Thread David Adams via 4D_Tech
Jeff,

Probably unrelated, but I've had a bug on file for months (V16 and later,
if I remember correctly) having to do with the file system and CALL WORKER.
Weird race conditions that lead to a crash (Windows) or something like 21
identically named "unique" worker processes and then you're stuck (and have
to force quit) on macOS. I can't give you a bug reference as I don't have
one (wrong hemisphere, no access to the system for us.) I rechecked the bug
a few times with new releases, but not change. It takes about a minute to
produce the problem using a simple sample database that I sent to 4D. I've
never heard anything from them on the subject, so I have no idea where a
fix stands in their list of priorities.

It took me about 15 minutes to stumble across that bug the first time I
tried CALL WORKER to try and implement a centralized log writer, a perfect
match for CALL WORKER. Unless you need to roll your logs. Then, not so much.
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Bug with Open Document on macOS Sierra

2017-07-25 Thread Jeffrey Kain via 4D_Tech
There was no code at all in the debug log prior to the reception of the outside 
call event.

--
Jeffrey Kain
jeffrey.k...@gmail.com

> On Jul 25, 2017, at 6:55 PM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If there are object scripts they run before form method 

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread David Adams via 4D_Tech
One way to think about C_OBJECT is as an "alias." There's a master/single
copy somewhere and all other references are nothing but aliases/references.
Except when they're not. The OB Copy command is a way of explicitly cloning
an existing object so that now you have two distinct copies.

Is that potentially confusing? Can it lead to hard-to-figure-out bugs? Yes
and yes. Is it a reasonable thing to do in a language? Most every language
that I've ever looked at thinks so, so why not 4D? But it does take keeping
things clear in your head. The simplest approach is to figure out a few
patterns that work consistently in a way that you understand and then try
and get into more nuance. Otherwise, references can behave in ways very
like badly used globals. Very easily. (Change something here and then
unexpectedly other stuff changes. Unless it doesn't.)

As Jeff pointed out, lacking comprehensive official documentation, relying
on nuance is probably foolhardy anyway.

But, again, 4D *officially* ignores this list. (To the point of not
mentioning their excellent blog posts or tech notes, as far as I can tell),
so don't expect answers here. Post on the forums and see how it goes. But
please post back here for those of us that aren't using the forums.
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Bug with Open Document on macOS Sierra

2017-07-25 Thread Chuck Miller via 4D_Tech
If there are object scripts they run before form method 

Regards
Chuck 

Sent from my iPhone

> On Jul 25, 2017, at 6:51 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 've verified the "no code runs" part both by setting a break point in the 
> first line of the form method of process 1, as well as by turning on logging 
> and examining 4D's debug logs.

**
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:4d_tech-unsubscr...@lists.4d.com
**

Bug with Open Document on macOS Sierra

2017-07-25 Thread Jeffrey Kain via 4D_Tech
Has anyone else seen some really strange bugs with the Open Document command on 
Sierra?

One manifestation:

Process 1:
  Display a form
  From the form, open a dialog box ("d1")
  Call open document
  Close the document
  Close the dialog ("d1")
  (Now you're back at the form)

Process 2:
  Do a call process to process 1
  Before any code runs, an empty "d1" dialog (with the same window title as 
before, but no contents) appears that cannot be closed. Yes, this dialog was 
properly closed the first time by passing a window reference to CLOSE WINDOW.


It doesn't seem to hurt anything... but this is really bizarre.

If you replace the open document command with a wrapper that runs in its own 
process and returns the docRef back to the calling process, the problem goes 
away.

I've verified the "no code runs" part both by setting a break point in the 
first line of the form method of process 1, as well as by turning on logging 
and examining 4D's debug logs.

Anyone seen anything like this?
  
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Tom DeMeo via 4D_Tech
FWIW - This does sound like the way javascript objects work.


Tom DeMeo
**
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:4d_tech-unsubscr...@lists.4d.com
**

Listbox entry gotcha

2017-07-25 Thread Kirk Brooks via 4D_Tech
Open a form with a listbox. I am looking at an array based listbox, don't
know if this is true for selection based but I suspect so.

Make an edit in a cell but DO NOT press tab, or enter or click anywhere
else in the form. Now add something to the listbox via drag and drop (or
perhaps some other programatic event).

Because you did not trigger the focus to change the on data change event
doesn't fire either and the contents of the cell revert to whatever they
were before the entry. Tech Support has confirmed this as the expected
behavior and suggested I might use On after keystroke. Not really an easy
option given the calculations that run as the result of data change. Not to
mention the opportunity for erroneous calcs based on incomplete data. And
in the context of one keystroke to another there's no way to tell which one
was the last one.

That last point is important because the next event is going to take place
in the context of itself. Meaning if I use some other event, On drag over
looked promising, with POST KEY to hit the tab -- it still doesn't trigger
a data change event on the cell that was edited. Other things like on
deactivate do not fire for an object or subform.

It appears the only solution is to set a 'shadow' object for the listbox
and at each keystroke update it with the row, column and new data.
C-objects will let me store any data type so at least there's that. Then On
data change and On drop use that object for updating and saving if it's not
empty. Seems like a lot of workaround to accommodate data entry with drag
and drop.

​This only comes up rarely but it's a problem when it does.

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: nested components

2017-07-25 Thread Chip Scheide via 4D_Tech
THANKS!

That should work too.. I'll have to try and play with this a bit.

On Tue, 25 Jul 2017 16:56:22 -0500, Keith Culotta via 4D_Tech wrote:
> I have one component that is used by the Host and by other 
> components.  These other components are also used by the Host.
> 4D puts all the components at the same level in the Components folder 
> at compile time and it works.
> The Component can also call a Host method if the method in the Host 
> is shared.
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: nested components

2017-07-25 Thread Chip Scheide via 4D_Tech
yes - that was what I was thinking.

given:
User_Database (which contains)
  Set_Component (which contains)
 Error_Component


User_Database can make calls to Set_Component.
Set_Component can make calls to Error_Component.
BUT  
User_Database can NOT make calls to Error_Component.

additionally, I have no need to make calls to Set_Component from 
Error_Component
BUT - if I found a need, I can use:
Execute Formula ("Set_Component_Method_name")



On Tue, 25 Jul 2017 21:38:26 +, Wayne Stewart wrote:
> Chip,
> 
> The only way to this stuff easily is one way calls.
> 
> Component A can call Component B but not vice versa.
> 
> If you need to call in both directions then Execute Method or Execute
> Formula are your friends.
> 
> In the host database have both components available. You can’t use a
> ‘contained’ component.
> 
> Wayne
> 
> On Wed, 26 Jul 2017 at 06:41, Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com>
> wrote:
> 
>> I am working on a couple of components.
>> in them I use (reuse) the same code for managing errors, like bad
>> parroter values.
>> 
>> can I:
>> - break this error code out into a component, lets call it 'Text_Errors'
>> - then place the 'Text_Errors' component into an other, eventually to
>> be built, component?
>> -and then access the methods in the 'Text_Errors' component from the
>> 'higher level' component.
>> 
>> assuming I can do this, what happens with the final host database?
>> - can the final (host) system see the lower/lowest level component?
>> 
>> (in Ascii)
>> Top level (Host) system
>>|
>>  Component-1
>>|
>>  Error_Component
>> 
>> 
>> Thanks
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
>> **
>> 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:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> -- 
> 
> Regards,
> 
> Wayne
> 
> 
> [image: --]
> Wayne Stewart
> [image: http://]about.me/waynestewart
> 
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: nested components

2017-07-25 Thread Keith Culotta via 4D_Tech
I have one component that is used by the Host and by other components.  These 
other components are also used by the Host.
4D puts all the components at the same level in the Components folder at 
compile time and it works.
The Component can also call a Host method if the method in the Host is shared.


Component-1
  |
  Error_Component


Component-2
  |
  Error_Component


Top level (Host) system
  | 
  Component-1
  |
  Component-2
  |
  Error_Component


Keith - CDI

> On Jul 25, 2017, at 3:44 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am working on a couple of components.
> in them I use (reuse) the same code for managing errors, like bad 
> parroter values.
> 
> can I:
> - break this error code out into a component, lets call it 'Text_Errors'
> - then place the 'Text_Errors' component into an other, eventually to 
> be built, component?
> -and then access the methods in the 'Text_Errors' component from the 
> 'higher level' component.
> 
> assuming I can do this, what happens with the final host database?
> - can the final (host) system see the lower/lowest level component?
> 
> (in Ascii)
> Top level (Host) system
>   | 
> Component-1
>   |
> Error_Component
> 
> 
> Thanks
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: nested components

2017-07-25 Thread Wayne Stewart via 4D_Tech
Chip,

The only way to this stuff easily is one way calls.

Component A can call Component B but not vice versa.

If you need to call in both directions then Execute Method or Execute
Formula are your friends.

In the host database have both components available. You can’t use a
‘contained’ component.

Wayne

On Wed, 26 Jul 2017 at 06:41, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I am working on a couple of components.
> in them I use (reuse) the same code for managing errors, like bad
> parroter values.
>
> can I:
> - break this error code out into a component, lets call it 'Text_Errors'
> - then place the 'Text_Errors' component into an other, eventually to
> be built, component?
> -and then access the methods in the 'Text_Errors' component from the
> 'higher level' component.
>
> assuming I can do this, what happens with the final host database?
> - can the final (host) system see the lower/lowest level component?
>
> (in Ascii)
> Top level (Host) system
>|
>  Component-1
>|
>  Error_Component
>
>
> Thanks
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **

-- 

Regards,

Wayne


[image: --]
Wayne Stewart
[image: http://]about.me/waynestewart

**
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:4d_tech-unsubscr...@lists.4d.com
**

nested components

2017-07-25 Thread Chip Scheide via 4D_Tech
I am working on a couple of components.
in them I use (reuse) the same code for managing errors, like bad 
parroter values.

can I:
- break this error code out into a component, lets call it 'Text_Errors'
- then place the 'Text_Errors' component into an other, eventually to 
be built, component?
-and then access the methods in the 'Text_Errors' component from the 
'higher level' component.

assuming I can do this, what happens with the final host database?
- can the final (host) system see the lower/lowest level component?

(in Ascii)
Top level (Host) system
   | 
 Component-1
   |
 Error_Component


Thanks
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Peter Bozek via 4D_Tech
On Tue, Jul 25, 2017 at 9:49 PM, Keith Culotta via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> It was mentioned at the introduction of CALL WORKER that not needing
> global variables was somehow in the mix.  Is C_Object the thing that
> enables this?  In other words, have a WORKER with a $myGlobals object.  As
> long as the WORKER is alive, that object is available to all methods.
>
> Keith - CDI
>
>
I asked 4D and was told that if object is passed to worker, worker gets
copy. Did not test that, but it makes sense.

-- 

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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Jody Bevan via 4D_Tech
I would like that objects created in a specific way could be accessed by worker 
methods. We store so many settings it is somewhat of a pain to not be able to 
use them like we do everywhere else. I have not tried this ‘feature’ and until 
it is a documented feature I likely will not try it. From all that I have read, 
and watched on workers this would defeat their stated purposes though.


Jody Bevan
ARGUS Productions Inc.
Developer
Argus Productions Inc. 




> On Jul 25, 2017, at 1:49 PM, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> It was mentioned at the introduction of CALL WORKER that not needing global 
> variables was somehow in the mix.  Is C_Object the thing that enables this? 
> In other words, have a WORKER with a $myGlobals object.  As long as the 
> WORKER is alive, that object is available to all methods.

**
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:4d_tech-unsubscr...@lists.4d.com
**

v13 Execute Immediate causing 'Remote SQL server' error

2017-07-25 Thread Kirk Brooks via 4D_Tech
Hi folks,
A v13 server db is throwing a "Remote SQL Server not available" error when
running this code:

__statement:="SELECT _SuperUser, "+$field+" FROM Agents WHERE _Agent_ID =
"+String($agent_id)+" INTO :__superUser, :__Access"

Begin SQL

EXECUTE IMMEDIATE :__statement;

End SQL

$0:=(__superUser | __Access)


$field is the name of a field in the [Agents] table. There's a different
error if the field name is wrong. This is only happening on the 4D Server
installation.

Any ideas what's going on? I'm thinking the client is running an old
version of v13 server.

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Kirk Brooks via 4D_Tech
Jeff,
On Tue, Jul 25, 2017 at 8:53 AM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> You can start in, say, method A with a line like
>
>   $obj:=[Table]objectField
>
> ... and pass $obj through any number of methods as a local variable, or a
> pointer, or a process object variable. Any changes anywhere down the line
> will be made in [Table]objectField, since that's the only "real" object --
> everything else is just a reference.
>
​It would never occur to me to do that but it's an interesting case to
think about. ​But by involving an object field I would think you'd be
ultimately limited by where the record was loaded. If we make the
assignment in Process A, and then pass the object to Process B I would
expect Process B to begin working with a copy of $obj, not the actual
object. Have you tested that changes made in Process B are reflected in
[Table]objectField?

And let's say we close process A but not B. I don't think the object just
goes away.

I may have to make a db and try these things out tonight. This is pretty
interesting the more I think about it.

Regarding not being a fan of the memory heap, and recalling I'm not the
most informed computer architecture guy, what are other approaches to
managing objects in memory?

Since I do a lot of work with parsing chunks of text into arrays, for
instance, it seems like a benefit to be passing references to an object
rather than the object. I have had the impression that given:

$chunk1:=Parse_some_text

Parse_text_toArrays($chunk1;->array)

Parse_text_toArrays
​ creates a separate copy of $chunk1 whereas​

$chunk1:=Parse_some_text

Parse_text_toArrays(->$chunk1;->array)

Parse_text_toArray works with the original $chunk1 directly via
dereferencing the pointer. If I understand your point in both cases I'm
passing a reference to the object. Presumably in the first case I would
make a copy of the object as soon as I do anything to alter it. Do I have
this right?

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Best way to stash an object array into an object field

2017-07-25 Thread Koen Van Hooreweghe via 4D_Tech
Hi David,

What about:

OB SET ARRAY([Table]ObjectField";"my_object_array_name";$my_object_array)

HTH
Koen

Op 9-jul.-2017, om 03:47 heeft David Adams via 4D_Tech <4d_tech@lists.4d.com> 
het volgende geschreven:

> ...I've got some summary data I'm storing in a fact table and want to stash
> an array of objects in an object field.
> 
> Is that a thing? You can't assign it directly, and I tried assigning it in
> a chain like this:
> 
> [Table]ObjectField:=JSON Parse(JSON Stringify Array($my_object_array))




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Jeffrey Kain via 4D_Tech
This is correct, and unfortunate. Different people from 4D have even called it 
a bug, but this is how it is.

You can start in, say, method A with a line like

  $obj:=[Table]objectField

... and pass $obj through any number of methods as a local variable, or a 
pointer, or a process object variable. Any changes anywhere down the line will 
be made in [Table]objectField, since that's the only "real" object -- 
everything else is just a reference.

Not a fan -- this is no better than process variables when things get complex. 
But I guess the alternative is managing your objects yourself which most people 
wouldn't like.
 
--
Jeffrey Kain
jeffrey.k...@gmail.com




> On Jul 25, 2017, at 2:29 AM, Peter Bozek via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> As I understand it, there is one 'heap' of objects, what means all objects
> are IP (where by object I mean here data structures containing data).
> Object variables are local, process or IP, but they are just references to
> this global object heap.

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Kirk Brooks via 4D_Tech
Hi Peter,
Great reply. You helped my understanding of the way ref-counting functions
with respect to c-objects a lot. The concept of the memory heap has only
mattered to me peripherally and so ref-counting was a similarly hazy idea.
The result of mainly dealing in 4GL languages. Anyway now I get that the
objects all exist physically in the same memory heap with the references to
them being dependent on the scope the reference is created in. Nice.

On Mon, Jul 24, 2017 at 11:29 PM, Peter Bozek via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> >  ​
> > SET($1->;"name";"Kirk")
> >
> > ​then myMethod will work the same way on the client or EOS. However I
> > suspect the time to dereference a pointer adds some time on the client
> side
> > that wouldn't be required by simply accessing the object directly. ​
> >
>
> This is something I would like to test. In fact, I never tried to pass
> pointer to EOS method and do not have clue if it will be working (or is
> allowed.)
>
​ This is something I can speak to. Josh pointed me (couldn't resist) to
using pointers with EOS methods as a way to pass a pointer to the server.
Great way to populate arrays instead of packing them in to blobs, for
instance.

​An even better tip​ is this:

On the server create a stored method that performs onerous lookups and
stores the results in IP vars - like objects or arrays. It can run as often
as necessary. The IP vars persist as long as the server is running.

Make an accessor method with the EOS property like so:

GetVar(text; pointer)

where $1 is just a label and $2 is ptr to the client var to populate. It
could look like this:

Case of

:($1="salesSummary")

$2->:=<>salesSummary

End case


You can call it using local vars on the client:
GetVar("salesSummary";->$obj). ​That's fast. And since you are accessing IP
vars on the server you don't need to worry about accessing a particular
server process - server side IP vars are available to any instance of the
'twin' process. And since you are only reading the vars you don't need to
worry about locking them on the server. Unless you are using them in some
dynamic way which isn't what I'm describing here. Works v13+.​

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Host methods, and components

2017-07-25 Thread Chip Scheide via 4D_Tech
> METHOD GET NAMES
> http://doc.4d.com/4Dv16/4D/16.1/METHOD-GET-NAMES.301-3376032.en.html
> will return a list of shared method names.

Thanks!

On Mon, 24 Jul 2017 22:37:39 +, Keisuke Miyako via 4D_Tech wrote:
> METHOD GET NAMES
> http://doc.4d.com/4Dv16/4D/16.1/METHOD-GET-NAMES.301-3376032.en.html
> will return a list of shared method names.
> 
>> 2017/07/25 5:47、Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> if not, is there some way to determine if a method exists in the 
>> host, from a component?
> 
> 
> 
> 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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:4d_tech-unsubscr...@lists.4d.com
**

4D Users In Israel

2017-07-25 Thread David Weinberg via 4D_Tech
Hi All,

I am wondering what the 4D user community is like in Israel. Looking at the
4D website, I do not see any official presence.

Are there any list members in Israel?

-- 
David Weinberg
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: C-objects and memory use

2017-07-25 Thread Peter Bozek via 4D_Tech
On Tue, Jul 25, 2017 at 1:41 AM, Kirk Brooks via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I want to make sure my understanding about how c-objects are handled in 4D
> memory. Mainly because it seems this understanding is cobbled together from
> a number of different sources few of which I can easily find again. So...
>
>

Kirk,

Here is how I understand objects. Not sure if it is correct, and while I
use object a bit, I cannot claim I tested all my assertions, so they can be
wrong. Anyway, it may be interesting to compare our views:


> 1) c-objects are created within the 3 4D scopes: IP, process or local.
>

As I understand it, there is one 'heap' of objects, what means all objects
are IP (where by object I mean here data structures containing data).
Object variables are local, process or IP, but they are just references to
this global object heap.

You mention that variables are something like pointers, I prefer to
consider them a references (like 'fifth object from the right') for the
following reason:
Objects are ref-counted. This means that each (global) object keeps count
how many variables (local, process and IP) is referencing this object. When
that count get to 0, object is deleted.


>
> 2) but they share some characteristics with hLists and menuRefs in that
> once created they can be referred to by different instances. For example,
> if I create an process object called "prosObj" as:
>
> { obj1: {name: Kirk, ID: 1234},
>
>obj2: {name: Joe, ID: 5678}}
>
> In this case, object heap will contain three objects, each with refcount
of 1:
{name: Kirk, ID: 1234}
{name: Joe, ID: 5678}
{obj1: reference to first object, obj2: reference to second object}


>
> I can create a local obj as:
>
> $obj:=OB GET(prosObj;"obj1")
>

you create a local (object) variable referencing first object, and refcount
of this object is increased to 2.

3) My first point of clarification is that $obj is simply referencing
> prosObj so it's not significantly increasing the amount of memory used.
>

yes, object variables are just references to objects (data structures
containing object data.)

>
> 4) Conversely if I created $obj using the copy command it would. So
>
> $obj:=OB COPY(OB GET(prosObj;obj1))
>
> would create a full copy of obj1 and take up more memory.
>

More interesting case is what happens if you copy the main object
containing references to other objects. I believe references are not
coppied, it means you will get another object with object references to
original objects (And refcounts of original objects will be increased.


>
> 5) This referencing feature also applies to objects in arrays. It's easy to
> discover this inadvertently:
>
> ARRAY OBJECT($aObjs;0)
>
> OB SET($obj;key;"new value")
>
> APPEND TO ARRAY($aObjs;$obj)
> APPEND TO ARRAY($aObjs;$obj)
> APPEND TO ARRAY($aObjs;$obj)
>
> $aObjs has 3 element each containing: {key;"new Value"}.
>

As I understand it, you have only one object  {key;"new value"} with for
variables referencing it: $obj, $aObjs{1}; $aObjs{2} and $aObjs{3}.


> If I modify $obj:
>
> OB SET($obj;key;"defined value")
>
> ​each element of $aObjs is now ​
>  {key;"new Value"}
>

you mean {key;"defined value"}?


> ​Again, I'm assuming $obj only exists in memory one time with each element
> of $aObjs referring to it.
>

Yes, this is my understanding as well.


> 6) I can clear $obj without erasing the referenced values by calling:
>
> $obj:=JSON PARSE("{}")
>

yes, this creates a new (empty) object storage and stores reference to it
into $obj, and decreases refcount to original object by one. In this
example, original object data are still references by three array elements.
When method ends and local array $aObjs is cleared, the data will be
cleared.


> 7) ​And unlike menus and hLists ​the memory occupied by $obj is released
> when the process end.
>

No, objects are released - in the sense the memory occupied by it is
cleared - when their refcount is 0. Ending method clears references from
local object variables, ending process clears references from process
variables. But if you have


C_OBJECT($obj)
OB SET($obj;key;"value")

<>ipObj:=$obj

object {key;"value"} will not be cleared when method or process ends.

​
>
> 8) Passing objects as parameters is essentially equivalent to passing
> pointers to c-obj vars EXCEPT when working with a method called with
> Execute on server - object references don't propagate when moving between
> the twin and local process. So let's say myMethod
> does this:
>

Yes, when you pass object to server process or method executed on server,
object is serialized, send to other side and there recreated.

The same seems to hold if you pass object to worker, but this I have not
tested (but if it would not be true, we would have values shared with
workers.)



>  ​
> SET($1->;"name";"Kirk")
>
> ​then myMethod will work the same way on the client or EOS. However I
> suspect the time to dereference a pointer adds some time on the client side
> that wouldn't