I think you should stop thinking about dot notation as object orientation. 
Concepts like classes and inheritance aren't supported yet, and saying 
$animal:=$dog isn't inheritance -- it's just assigning one object's reference 
to another and kind of backwards at that.

Don't try to fit a square peg into a round hole just yet. 4D has said these 
things are coming.

4D had a weird example in their blog, though... you could make a method called 
"New Animal" (yes, with a space... cheap trick), that creates an object and 
sets some properties for all animals. Then you could write

$dog:=New Animal

... and then start customizing the properties of dog based on the 
not-really-a-superclass Animal. 

I think this is a waste of time knowing that a proper implementation is coming 
someday... and having a space in the method name is bad enough, but there's no 
proper support for this in the language, debugger, or compiler yet, and you'll 
probably end up rewriting it all someday relatively soon anyway.

> On Sep 15, 2019, at 6:12 AM, Peter Jakobsson via 4D_Tech 
> <[email protected]> wrote:
> 
> 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.

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

Reply via email to