skip to main content
OpenEdge Development: AppBuilder
Frequently Used Dialogs : SmartObject properties
 
SmartObject properties
A SmartObject has few editable properties of its own, although the basic objects that make up its run-time representation, if any, have all the properties associated with their kind. There is no Advanced Properties dialog box for a SmartObject as such, though there is for any widget the object uses for its run-time representation.
You can open the Property Sheet for a SmartObject other than a SmartWindow, SmartDialog, or SmartFrame by any of these methods:
*Clicking its menu button and selecting the Properties menu item
*Right-clicking on the object and selecting the Properties menu item
*Selecting the object and choosing ToolsProperty Sheet
The Property Sheet dialog box appears:
This Property Sheet dialog box combines information about both the master object and the particular selected instance. The fields are:
*Object — The instance handle identifier. You should change this to more clearly reflect the role of the object in your application.
*Type — This read-only field identifies the class to which this object belongs.
*Master File — The master file that this instance uses. Choosing the File button opens a dialog box that allows you to associate a different master with this instance. Be cautious about using this ability.
*Instance Properties — The nature of the properties in this list varies with the object class. See the relevant chapter of this manual for a description of the instance properties pertaining to a particular SmartObject class. Click Edit to change the editable properties.
*Parameterize as Variable — This toggle is normally cleared. Setting this box causes AppBuilder to treat this object as a placeholder for its class rather than as an instance of a specific master object.
By default, every instance of a SmartObject represents a particular master object with a defined set of behaviors. For example, a given SmartDataBrowser instance is constrained to display a certain set of fields, generally from a particular database, and only those fields. Under some circumstances, you might find it advantageous to be able to treat a SmartObject instance as a design-time placeholder, instead. That would allow you to defer the choice of master until run time, when you could choose, load, and run a situation-specific instance under program control. See the “Creating a SmartObject placeholder” section for information about how to do this.
Creating a SmartObject placeholder
You can add an object to hold the place of an object you plan to develop later.
To use an instance of a SmartObject as a design-time placeholder:
1. Place a SmartObject instance.
2. Open the object's Property Sheet. Set the Parameterize as Variable check box. A fill-in field opens to the right, as shown:
Type in the identifier for the variable you will use to control which master gets loaded at run time.
3. Select the SmartContainer that supports the new placeholder. Open the Section editor to the Definitions area, and define the variable. Add additional code in the appropriate section to resolve the reference.