[Cuis-dev] relationship between Behavior, Object, and ProtoObject
Jaromir Matas
mail at jaromir.net
Fri Jul 12 08:37:26 PDT 2024
On 12-Jul-24 3:30:39 PM, "Mark Volkmann via Cuis-dev"
<cuis-dev at lists.cuis.st> wrote:
>I understand that Object is a subclass of ProtoObject and that the
>`basicNew` and `new` methods are defined in Behavior. But I can't find
>a relationship between Object and Behavior
Object class superclass superclass superclass superclass " -->
Behavior "
>, or between ProtoObject and Behavior. Can someone explain how it is
>that I can send `#new` to any object?
In general you don't send #new to _any_ object but usually just to
classes. They are instances of other classes (metaclasses) - like Object
class etc. And all metaclasses are subclassed from Class which in turn
is a subclass of Behavior.
Here's a nice description by Leandro Caniglia:
https://stackoverflow.com/questions/57898036/is-it-true-that-metaclass-class-is-just-metaclass
>How does it find that method in `Behavior`? I tried to use the debugger
>to discover the answer, but that didn't help me to find the answer.
>
>--
>R. Mark Volkmann
>Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240712/46e4a355/attachment.htm>
More information about the Cuis-dev
mailing list