Define a new model

    The dynamic model is an object-oriented programming method. Defining a new model is equivalent to defining a class.

1. Methods of defining class models

    In dynamic model programming, a class is also an object, and a class is also a normal model.

    Defining a class (also called a descriptor) is to define what attributes (child nodes) and behaviors it has. In the model editor, it is done by adding the attributes and things of the model. (Child node) and actions (action behavior) child node to complete.

    In XWorker, a meta thing called xworker.lang.MetaDescriptor3 is often used to create a new descriptor.       

2. Example

    The following GIF video demonstrates how to define a Person class (descriptor) in the thing manager.



Copyright ©  2007-2019  版权所有  沪ICP备08000575号