Hi

Using the v17 dot notation I was unable to get one object to inherit another’s 
properties using the assignment operator. Also when I inspect $dog in the 
debugger after assigning the first property, it appears empty.

Code is:

C_OBJECT($animal;$dog;$cat)

$dog:=New object
$cat:=New object

$dog.sound:="bark"
$cat.sound:="meow"

$animal:=$dog
$getSound:=$animal.sound

Running this in the debugger, $dog and $cat return “{}”, yet hovering over 
$dog.sound with the cursor does display the property value. $animal.sound 
returns undefined.

Why does this not work ?

Regards

Peter

**********************************************************************
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