I am trying to figure out if this is a bug or not.  This is a watered down 
version of something I am trying to do:


                $oChildObject:=New object
                $oParentObject:=New object

I want $oChildObject and $oParentObject.ChildInformation to remain the same and 
should because of how the references work, so at this moment each are 
{FirstName:John,LastName:Smith}.  Let say something happens like maybe there is 
a Clear button, how would one clear the child object?

First, I wanted to do this:

                $oParentObject.ChildInformation:=Null // $oChildObject = 

Okay, I thought that was the correct way to clear both objects but maybe there 
is a different way so maybe this?

                OB SET($oParentObject;"ChildInformation";New object) // 
$oChildObject = {FirstName:John,LastName:Smith}

Nope, again the child object with $oParentObject is cleared but $oChildObject 
remains {FirstName:John,LastName:Smith}.  So do I really have to loop over all 
properties and remove them individually?

                OB REMOVE($oParentObject.ChildInformation;"FirstName")
                OB REMOVE($oParentObject.ChildInformation;"LastName")  // 
$oChildObject = {}

Finally when I make a change in the $oParentObject.ChildInformation the 
referenced object $oChildObject is also updated.

Is this a bug?  Shouldn't the :=Null work and also change the $oChildObject 


4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com

Reply via email to