Contents
    1. Docked object editor
    2. Floating object editors
    3. General use
    4. Using Constants
    5. Advanced property manipulation
    6. Event connection

An object editor is a tool which allows you to edit the properties of a selected object . Common properties include minimum width and height, color, text etc.

An object editor can only reference one object at once, and when not empty, it is considered to be "targeted" to the object whose properties it references.

The screenshot above shows a floating object editor. The docked object editor is almost identical except that it is located within the EiffelBuild main window.

Docked object editor

The docked object editor is displayed to the right hand side of the EiffelBuild main window. This editor is always displayed and is permanently linked to the layout constructor . This means that whenever the selected object changes in the layout constructor , the docked object editor becomes targeted to this object .

Floating object editors

These object editors appear in their own window, and you may open as many of these as you wish.

To open a new floating object editor, drop an object on , displayed in the main toolbar and also in each existing object editor. The new object editor will then be targeted to the object that was dropped .

Note: If the object targeted to floating object editor is deleted, then the editor will be destroyed. This helps stop the screen becoming cluttered with empty editors.

As a shortcut to a complete pick and drop transport, you may hold down the Ctrl key while starting the pick , which will immediately open a new floating object editor targeted to the object you clicked.

General use

When an object editor is targeted to an object , you will see that controls are available within the editor to customize that object . Although every different type of object will have different sets of properties that may be modified, the manipulation of these properties is as standardized as possible. Below are some general rules that apply:

  • String properties inputted via a text field are updated within the object every time a key is pressed
  • Integer properties inputted via a text field are only updated within the object when return is pressed, or the input box looses the focus.
  • Almost without exception, a push button which controls a property, will open up a dialog, allowing the property to be edited. Examples are colors, pixmaps and events.
  • If when you attempt to modify a property, it returns back to its original value, it means that the value you attempted to enter was invalid. For example, looking at the screen show above, if you enter -50 into the minimum_height text field and press return, it will revert back to 23. This is because the minimum_height of an EV_BUTTON may not be set to less than 0. To find allowable values for properties of an object , consult the EiffelVision 2 documentation.

All properties that may be manipulated in an object editor correspond directly to a property of the EiffelVision 2 control that is represented by the object (Displayed in an object editor as type). There is one exception to that rule though, and that is the Name field which is specific to EiffelBuild. This field is used for your identification of the object and as the attribute name in the generated code. For example, when EiffelBuild generates code corresponding to the object targeted in the editor shown above, it would declare the EiffelVision 2 component as - button1: EV_BUTTON

Note: You may have as many object editors targeted to the same object as you wish. Whenever a change is made to the object through one of the editors, all other editors targeted to that object are synchronized.

Using Constants

All fields that may use constants have a button marked with the constants symbol , which when selected, modifies the field to allow selection of the desired constant. A combo box is displayed with all valid constants (matching the type of the property) displayed, from which you may select the constant you wish to use. To remove the use of the constant, simply press the constants button again, which removes the constant, and sets the property to a manifest value representing the previous value of the last selected constant.

Advanced property manipulation

Although many of the properties of objects are relatively simple, and can be manipulated with STRING or INTEGER values, there are others that require more complicated control mechanisms. The following object properties have more complicated interfaces warranting further explanation:

For all "top level" objects (those contained within the widget selector which are to be generated as individual classes), a check button marked "Generate as client" is available towards the top of the Object Editor. If this is checked, the generated class uses the widget type of the object as a client, otherwise it inherits directly from the widget's class.

Event connection

As well as being able to manipulate the standard properties of an object , facilities are provided for connecting to the events of an object . Looking at the object editor screenshot above, you will see that there is a button marked Select events which is also available in all targeted editors.

Note: The button will be marked Modify events when one or more events are already selected for the current object .

Clicking this button will cause the following dialog to be displayed:

Looking at the screenshot above, you will see that this dialog contains all the action_sequences available for the EV_BUTTON to which the object editor is targeted.

If you check a button connected with one of the action sequences, you will be then able to enter the name of a feature that you wish to connect to the action sequence. The screenshot above shows the user has connected a feature named button_pressed to the select_actions. When code is generated , this will cause EiffelBuild to generate an empty feature named button_pressed already connected to the select_actions of the button.

Note: You will only be allowed to enter valid and unique Eiffel feature names. If a name is invalid, it will be highlighted in red, and a dialog will warn you when you attempt to close the dialog.

See Also:
Create an object
Delete an object

f00025e2-f39b-d0a2-9b2b-207768771905