John: I would use Cannon Smith's "OBJ Module". The component is 4D code that allows supports dotted notation.
For many years, I passed an Object Tools Object at $1 so my code looks like C_Longint($h_;$1) $h_:=$1 When I use C_Object, it's C_Object($O_;$1) $O_:=$1 -- Douglas von Roeder 949-336-2902 On Sat, Sep 2, 2017 at 2:43 PM, John Baughman via 4D_Tech < [email protected]> wrote: > In order to use dot notation a c_object must have been initialized. So > when passing a c_object as a parameter to a method you cannot use dot > notation on the object as you might normally do with any other kind of > parameter. This will not work... > > C_Object($myCoolObject;$1) > $myCoolObject:=$1 > If($myCoolObject.action=“Startup”) // this will generate a > syntax error. > End If > > So we have several options… > C_Object($1) > If($1=“Startup”) > End If > Or > c_Object($myCoolObject;$1) > New object(myCoolObject) > $myCoolObject:=$1 > If($myCoolObject.action=“Startup”) > End If > Or > C_Object($myCoolObject;$1) > $myCoolObject:=OB Copy($1) > If($myCoolObject.action=“Startup”) > End If > > Is any one of these options better than the other? I am guessing not. > Since I like to always have readable vars, $1 means nothing, I have opted > to use OB Copy as it is the simplest form and closest to myCoolObject:=$1. > > Any other way to do this? > > John > > > John Baughman > Kailua, Hawaii > (808) 262-0328 > [email protected] > > > > > > ********************************************************************** > 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] > ********************************************************************** ********************************************************************** 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] **********************************************************************

