Jump to: navigation, search

Difference between revisions of "HowTo:Create a new MetaClass"


 
(44 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Step by step ==
+
A new [[MetaClass]] has to be created as a derivative (child) from another class (parent). This can easily be done in the ''[[Class Browser]]'' control by
# Open the control [[Class Browser]]
+
# Locate and select the [[MetaClass]]you want to derive your new class from
+
# Create a new MetaClass via ''Derive new object'' from the context menu
+
# Open the control [[Object Editor]]
+
# Set the newly created MetaClass as context object to this control
+
# Set ''Name'', ''Description'' and ''Namespace'' properties
+
# Save the changes
+
  
== Technical implementation ==
+
# Navigate to the favoured parent MetaClass in the Class Browser
The system creates a new instance of ''CUSTOMMETACLASS'' and sets the ''INHERIT'' property to the MetaClass the context menu was opened at. New derivates can be created for any [[Basic System MetaClasses|system MetaClass]] such as ''BASECLASS'', ''REFERENCE'', ''SELECTIVELIST'', … etc.
+
# Create a new child MetaClass with ''Derive new object'' from the context menu<br/>[[File:UI_HowTo_CreateMetaClass_01.png|220 px|alt=Derive new object|Derive new object]]
 +
# Edit name and description, either
 +
#* in the ''[[Class_Browser#Editing_name_and_description_of_an_object|Class Browser]]''
 +
#* by opening and connecting the new MetaClass to the ''[[Object Editor]]'' control
 +
# Save the object with {{key press|Ctrl|S}}
 +
 
 +
== Technical background ==
 +
The system creates a new instance of [[CUSTOMMETACLASS]] and sets the ''Inherit'' property with the parent MetaClass. A custom MetaClass is consequently also an instance of CUSTOMMETACLASS and can be treated as a [[Content Object]].
  
 
==See also==
 
==See also==
* [[Create a new MetaProperty]]
+
* [[HowTo:Create a new MetaProperty]]
 +
* [[HowTo:Add_a_MetaProperty_to_a_MetaClass|Add a MetaProperty to a MetaClass]]
  
[[Category:How to...]][[Category:UBIK Studio]]
+
[[Category:Studio]]
 +
[[Category:How-To]]

Latest revision as of 15:46, 2 February 2015

A new MetaClass has to be created as a derivative (child) from another class (parent). This can easily be done in the Class Browser control by

  1. Navigate to the favoured parent MetaClass in the Class Browser
  2. Create a new child MetaClass with Derive new object from the context menu
    Derive new object
  3. Edit name and description, either
  4. Save the object with Ctrl+S

Technical background

The system creates a new instance of CUSTOMMETACLASS and sets the Inherit property with the parent MetaClass. A custom MetaClass is consequently also an instance of CUSTOMMETACLASS and can be treated as a Content Object.

See also