Code Editor
Contents
Purpose
The Code Editor is designed to display and edit the runtime behavior of a single UBIK® object. Technically, it reads the definition of overrideable properties and methods of the context object (directly from the context object if it is of type MetaClass, otherwise it gets the MetaClass of the context object and reads the definition from there).
When using the Code Editor, basic programming skills in Microsoft's C# are certainly beneficial.
Basics
Appearance
Code controls
The control reads the definition from the current context object and displays a code editing control for each eligible property or method, its appearance depending on status of the actual property/method:
Appearance | Example | Comment |
---|---|---|
Disabled expand button | The code for this property/method can't be edited | |
Enabled expand button | [[File:UI_CodeEditor_CodeControl_Enabled.png | The code for this property/method is editable |
Flat caption | [[File:UI_CodeEditor_CodeControl_Enabled.png | There is no custom code for this property/method stored yet |
Raised caption | There is already custom code for this property/method stored | |
Bold caption | - | The custom code for this property/method was edited but not saved yet |
Captions
Per default, each Code control shows the name of the respective property/method as its caption.
Tooltips
When hovering over the expand/collapse button of a code control, a Tooltip with its code will appear.
Drag & Drop
The Code Editor does not support Drag&Drop operations.
Toolbar
Item | Purpose |
---|---|
View Style | Indicates or changes the View Style of the control; changing it will result in reloading of the control |
Navigate to context object | Attempts to navigate to the current context MetaClass. |
Save | Saves the context object. |
This control doesn't feature any context menu yet.
View Styles
The Code Editor has four different View Styles, each of them providing different views and functionality.
Events
In this view mode you can override certain events that are thrown by an UBIK® object. This means that custom code can be executed once the event raises.
Methods
In this view mode you can override certain methods that are exposed by an UBIK® object.
MetaProperties
In this view mode you can override the code that is executed within the accessors of a UBIK® MetaProperty
Custom
In this view mode it is possible to store code which is not related to events, methods or MetaProperties but shall still be assembled with a MetaClass or with the entire customizing.