1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Oracle Unleashed- P16 docx

50 451 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 50
Dung lượng 206,37 KB

Nội dung

3 = Long Integer 5 = Double 8 = String 7 = Date The DrawStyle property determines whether the control uses the 3-D sculpted look and feel. The data type is long integer. This property is not readable nor writeable at run time. The default DrawStyle for all controls in OPO is Standard Control (a 2-D display modality). In OPO version 1.0, the alternative DrawStyle setting is 3D Control. The following controls respect the DrawStyle setting: field, rectangle, frame, and button. Although many of the OPO controls respect the 3D Control DrawStyle, the following controls do not actually display in a 3-D mode: line, oval, pop-up, combo box, and list box. The following controls do not have a DrawStyle property: chart, horizontal and vertical scrollbars, embedded form, repeater, bitmap, OLE, report group, current row pointer, and static text. Scroll bars and buttons do not display in a 2-D mode. The data type for the Enabled property is string. This property is readable and writeable at run time. Text for the control is displayed using the font indicated in the FontName property. The data type for this property is string. This property is readable and writeable at run time. If a font specified for FontName in the OPO design environment is not available on the target client environment, OPO uses the closest matching available font based on font name and font characteristics. If no matching font is found, the default font is used. System Font is the default font for button, chart, static field, checkbox, list box, and pop-up controls. Application Font is the default font for field, combo, and frame controls. You can set the FontName property during run time as follows: button1.FontName = "Times New Roman" OPO intelligently maps the supplied name against the list of available font names and picks the closest matching name. In a Microsoft Windows environment, for example, Times New Roman, Times Roman, Times, and Roman all yield the same font, Times New Roman. Remember that this FontName change is only valid during the active run-time mode for the affected objects. When the developer returns to the design-time environment, the change is lost and the FontName property is returned to its original design-time value. The HelpText property sets the text that is displayed in the active status line object when the cursor is moved over the object. The data type for this property is string. This property is readable and writeable at run time. OPO version 1.0 does not display the HelpText property during run time. The ReadOnly property determines whether the user can enter/edit the value of data in a control. The data type is long integer. This property is readable and writeable at run time. If the value of ReadOnly is True, the user cannot tab to the control or set the focus to the control. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The ScrollWithRow property determines whether a value specified for an unbound data control should scroll with each record in the active record manager. The data type is long integer. This property is readable at runtime. By default, ScrollWithRow is True, which implies that the record manager has a value for the unbound data control for each record in the table. If ScrollWithRow is False, the unbound data control is acting independently of the record manager and has only one value. This property is extremely valuable for controls that are used to limit the display of data within other record manager sets. For example, a pop-up could list all of the available departments in a company. Choosing a department from the pop-up could limit the list of employees displayed in a repeater to only those employees working in that department. The TabEnabled property determines whether the user can set the focus to the specified control using the Tab key. The data type is long integer. This property is readable and writeable at run time. The default value is True. If TabEnabled is True, pressing the Tab key navigates to this control in the order specified by the TabOrder property. Pushbuttons, radio buttons, and checkbox buttons are not tab-enabled on the Macintosh, although they are in the Microsoft Windows environment. If TabEnabled is False, the user cannot use the Tab key to navigate to the control. A False value for the TabEnabled property does not affect other methods or properties of the specified control. The TabOrder property specifies the order in which controls will be navigated to when the user uses the Tab key. The data type is long integer. This property is readable and writeable at run time. The Value property specifies the data stored in a control. The data type is specified by the control. This property is readable and writeable at run time. This property does not show up on the property sheet. The Visible property specifies whether the user can view the control. The data type for this property is long integer. This property is readable and writeable at run time. If the Visible property's value is False, the user cannot tab to the control or edit data in the control with the keyboard. Setting the Visible property of a container control also affects the visibility of the contained controls. Setting the Visible property of an embedded form, for example, hides the embedded form and all of the controls contained within the embedded form. The ZOrder property is not one of the properties for OPO controls that is displayed in the property sheet. The ZOrder represents the graphical redraw order when OPO redraws the screen. Objects are drawn starting with the lowest Zorder up through the highest ZOrder. The developer can manipulate the ZOrder property from the design environment through the Design menu, however. Under the Object menu item you will find the Further front, Bring to front, Further back, and Send to back options. These menu options, as well as the Bring to front and Send to Back toolbar icons, provide the developer with the ability to control the ZOrder of the currently selected controls. This property is not readable or writeable during run time. Common Methods Not only do many of the OPO objects have properties in common, they also have several common methods. For example, a button and a field object each have a Click() method. The default action associated with the Click() method varies according to the type of object, but generally the object receives a mouse down event followed by a mouse up event, and then receives the focus. Often a developer will want to perform special actions associated with the Click() method. A simple example would be to have the object issue a Beep command. If you select the field object and the button object on a form, the property sheet is titled Multiple Selection Properties and only displays the properties and methods that all the selected objects have in common. In Figure 40.3, button1 and field1 are selected and the Click() method is visible. If the developer opens the Click() method script window and enters the Beep command, clicking in the field or on the button causes a beep to be heard when the form is run. The following paragraphs highlight and discuss those methods that are common to most of the objects within Power Objects. Not all objects have these methods, but many objects do. These methods are those that are most likely to be Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. changed by a developer. The Click() method responds to programmatic references and a specific series of user-generated events, mouse down followed by mouse up. This method returns no data. If the developer doesn't override the Click() method, the click event propagates up the hierarchical containment to the object's container's ChildClick() method. The DoubleClick() method responds to programmatic references and a specific series of user-generated events: mouse down, mouse up, click, mouse down, and mouse up. The data type is long integer. If the developer specifies a non-zero return value, the Click() method is triggered after the DoubleClick() method is processed. Normally, the Click() method is not processed after the DoubleClick() method. The MouseDown() method responds to the user-generated event of mouse down and to programmatic references. This method returns no data. The MouseMove() method responds to user-generated events focused around changing the position of the mouse following a mouse down event. This method returns no data. The MouseMove() method fires for every position update inside and outside of the original object dimensions until the user releases the mouse, which forces a mouse up event. Visual effects are possible from within the MouseMove() method due to the inherent screen refresh after each pass through of the method code. The MouseUp() method responds to the user-generated event of mouse up and to programmatic references. This method returns no data. The OnLoad() method responds to an application-generated event. The event is the action of the OPO environment loading an object into active memory in order to process it or other related objects. This method returns no data. The OnLoad() method is a good place to put initialize code specific to an object. Exceptions to this rule include objects that have Initialize() or InitializeWindow() methods. The PostChange() method responds to the event of data being changed in a control through editing and scrolling of the record manager. Programmatic changing of data in a control does not fire the PostChange() method. This method returns no data. The PostChange() method is triggered after the Validate() method returns True. The RevertValue() method responds to the Esc key or to a programmatic reference. This method returns no data. The purpose of this method is to return the value of a control to its value prior to any editing. The Validate() method responds to the user editing the data in a control and attempting to force the data to update. The data type is long integer. If the Validate() method returns False, the focus remains in the control until a True result is returned for the Validate() method. The developer should take care to ensure that a True value can be returned; otherwise, an infinite loop will exist once the user edits the related control. Application-Level Objects The objects found within the application level form the basis for all interactions between the user, the database, and any other peripherals. These objects and their methods and properties are combined to build a series of screens and reports that approximate the set of related tasks that form the application. A form object is a screen or window. A report object can provide both a visual report and a printed report. Other application-level objects include bitmap resource objects, class objects, and OLE objects. Figure 40.4 displays the icons for each of these application-level objects. Figure 40.4. Application-level objects. Form Objects Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The form object is the object that an OPO developer uses most often. The form is the window or screen that the developer designs to interact with the user. The form is also the primary object for interfacing to the database. The form can contain other objects, except for other forms, reports, and report groups. The form is useful for displaying data, manipulating data, navigating to other forms, and linking to other applications through embedded OLE objects and OCX objects. Figure 40.5 displays a blank form with its accompanying property sheet. The remaining paragraphs within this section discuss the various properties and methods that are relevant to a form object. Figure 40.5. A form object. The CloseWindow() method responds to the action of closing a window both programmatically and through user events such as the System Menu Close menu item. This method returns no data. This method must be inherited in order for the window to close. For example if the developer places code in the CloseWindow() method, the code must also include inherited.CloseWindow(). The CommitForm() method responds to the Commit toolbar icon and to programmatic references. This method returns no data. The purpose of this method is to commit or save all outstanding changes associated with the Database Session associated with the form's RecordSource. If the developer places code in this method, then inherited.CommitForm() must be included or the commit action will never successfully complete for the specified form. The DefaultButton method specifies the button that should accept the default behavior for a pressed Enter or Return key when the active focus is not in a field control. The data type is string. This method is not readable or writeable at run time. The DefaultCondition method specifies the limiting condition to apply to the record manager for the specified form. The data type is string. This method is readable and writeable at run time. The DefaultCondition is synonymous to the where condition in a SQL statement. The DefaultMenuBar() method initializes a menu bar with the system default menus and application default menus appropriate to the form or report. This method deletes any existing menus before initializing the menu bar. The DefaultToolbar() method initializes the toolbar with the application default buttons appropriate to the form or report. This method deletes any existing buttons before initializing the toolbar. The DoCommand() method responds to programmatic references and user-generated events of menu and toolbar selections. The data type is long integer. DoCommand() passes the cmdCode up to the application level from the form or report level if the form or report does not process the cmdCode. The proper method for ensuring that the form- and report-level processing is completed prior to escalating to application-level processing is to assign the return value of True for the cmdCode. The GetMenuBar() method returns a reference to the menu bar associated with the form or report. The data type is object. The GetRecordset() method returns a handle or pointer to the record manager of the specified control. The data type is object. This method is readable at run time. This method is required for processing the data within a record manager programmatically and for DBRecordsets that have no controls associated with them for point-and-click interfacing. The GetStatusLine() method returns a handle to the status line object associated with the form. The data type is object. The GetToolbar() method returns a reference to the toolbar associated with the form. The data type is object. The InitializeWindow() method is used primarily for the creation of menus, toolbars, and status lines relevant to the Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. active form. This method returns no data. The developer should create custom menus, toolbars, and status lines in this method. The Label property specifies the title to display in the window frame title bar, if the WindowStyle option has a title bar. The data type is string. This method is readable and writeable at run time. The LinkDetailColumn property specifies the name of the column from the detail table to use when performing master- detail linking relationships. The data type is string. This method is readable at run time. The LinkMasterColumn property specifies the name of the column from the master table to use when performing master- detail linking relationships. The data type is string. The method is readable at run time. The LinkMasterDel property specifies what the default action will be with respect to detail (foreign key) records when the master (primary key) records are deleted. The data type is long integer. This method is readable and writeable at run time. This property helps to ensure and enforce the application's referential integrity. The values range from Refuse if children present, to Delete cascade, to Orphan details. The LinkMasterForm property specifies the name of the object that has the record manager for the master in the master- detail relationship. The data type is string. This method is readable at run time. The LinkMasterUpd property specifies what the default action will be with respect to detail (foreign key) records when the master (primary key) records are updated. The data type is long integer. This method is readable and writeable at run time. This property helps to ensure and enforce an application's referential integrity. The values range from Refuse if children present, to Update cascade, to Orphan details. The OpenWindow() method responds to programmatic references. This method returns no data. This method is responsible for displaying the form and its contained controls on-screen. If the developer places code in this method, the developer also needs to place inherited.OpenWindow() in the code so that the form draws on-screen. The Query() method responds to programmatic references and to the default menu and toolbar query commands. This method returns no data. The Query() method is responsible for updating the set of records being managed by the record manager that the Query() method is attached to. Query() also propagates to the session associated with the record manager. If the developer places code in this method, the record manager is not updated unless inherited.Query() is also placed in the code. This method respects the settings specified by the DefaultCondition for limiting the records that are brought into the record manager. The QueryWhere() method responds to programmatic references only. This method returns no data. QueryWhere() is very similar to the Query() method with the following exception. QueryWhere() includes the condition that is to be applied to the affected record manager in place of the DefaultCondition. As with many critical methods, if the developer overrides the processing of the QueryWhere() method by placing code in the method, the method does not execute unless inherited.QueryWhere( condition ) is also in the method code. The RecordSource property specifies the name of the database object, table, view, synonym, and so on that is being controlled by the record manager associated with the control. The data type is string. This method is readable at run time. The RecSrcSession property specifies the name of the database session object that links to the database objects used by the container. The data type is string. This method is not readable or writeable at run time. If the RecSrcSession is empty, the application's DefaultSession is used. The RollbackForm() method responds to the Rollback toolbar icon and to programmatic references. This method returns no data. The purpose of this method is to discard all outstanding changes associated with the database session associated with the form's RecordSource. If the developer places code in this method, inherited.RollbackForm() must also be included; otherwise, the rollback action will never successfully complete for the specified form. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The RowFetchMode property specifies how the record manager retrieves records from the database. The data type is long integer. This method is readable and writeable at run time. The three possible values are Fetch As Needed, Fetch Count First, and Fetch All Immediately. This property exists to permit the developer to fine tune the performance of the application with respect to fetching records from the database. RowFetchMode defaults to Fetch As Needed. This mode is the preferred fetch mode for client/server database applications. Typically, OPO fetches the same number of records from the database as are visible at one time. For example, it fetches one record for a form or embedded form and fetches multiple records for repeaters. Disk caching is minimized and performance (responsiveness) is maximized. Fetch All Immediately causes all records from the database to be fetched prior to returning control to the user. Disk caching is maximized and performance is minimized whenever the database size grows to be large. However, performance can be improved significantly if the database size is relatively small. A common pitfall for developers who rapidly prototype applications against a small, sample database is to set RowFetchMode to Fetch All Immediately to improve performance of the prototype, and then deploy the prototype as the production application without converting the RowFetchMode to Fetch As Needed. The SetMenuBar() method associates a menu bar with a form or report. The SetStatusLine() method sets the default status line object associated with the form through the status_line parameter. This method returns no data. If this method is not called, the form will not have a status line. The SetToolbar() method associates the specified toolbar with the form. The TestCommand() method polls to determine whether the user has interacted with the menu or toolbar. The data type is long integer. If TestCommand() does not return a value, OPO processes the cmdCode internally as appropriate. If TestCommand_Enabled is returned, TestCommand() calls DoCommand() with the cmdCode. The ValidateRow() method responds to the user actions that force a flushing of the record to the record manager or database. These actions include inserting a new record, committing changes to the database, and moving to another record manager. The data type is long integer. If the ValidateRow() method returns False, the focus will remain in the current control until a ValidateRow() True result is returned. The developer should take care to ensure that a True value can be returned; otherwise, an infinite loop will exist once the user edits the related control. The WindowStyle property specifies the style of framing placed around a form. The data type is long integer. This method is readable at run time. Nine styles are available. The default WindowStyle is Standard Document. The developer should take care to use the appropriate style based on the intended use of the form. For example, if the developer is going to use the form in a modal dialog functionality, the developer should use a dialog-based style. Although this recommendation is not enforced, the end user will be considerably confused to see a Standard Document window style on a modal dialog window. Report Objects The report object provides a mechanism for displaying data in a WYSIWYG preview mode and printing a hard copy image. The report cannot be linked in relationships to forms or any other objects that have record managers. A report is essentially a standalone unit connecting to the database independently of the other parts of the application. A report can use any object from the tool palette. Note that the repeater control will only be able to display records up to the number of visible panels in the repeater. Also, buttons and all other objects on the report are in a view-only mode when you preview the report; they do not respond to user-generated events, including mouse-related events. Figure 40.6 displays a blank report with its accompanying property sheet. The remaining paragraphs within this section discuss the various properties and methods that are relevant to a report object. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Figure 40.6. A report object. The OpenPreview() method must be called programmatically. This method returns no data. This method opens the form or report in a WYSIWYG preview mode. Normally a user is only allowed to open reports. The primary reason for opening a form is for documentation. The OpenPrint() method must be called programmatically. This method returns no data. The printer redirection dialog box open for the user to selection among printer options. OK causes a dialog box to appear that indicates that the report or form is printing. There are seven kinds of report objects: ● The ReportHeader Band object displays data at the top of the report that is considered global to the overall report. ● The PageHeader Band object displays data at the top of each printed page of a report. The FirstPgHdr property specifies whether the PageHeader band will be printed on the first page. The data type is long integer. This property is not readable nor writeable at run time. ● The developer creates the GroupHeader Band object by dropping the Report Group control onto a report. This band is used to display data at the top of each grouped area. The GroupCol property specifies the database column that the report uses for grouping. The data type is string. This property is not readable nor writeable at run time. The PageOnBreak property specifies whether the report should begin a new page with every new group. The data type is long integer. This property is neither readable nor writeable at run time. ● The Detail Band object displays the bulk of data related to the report. The detail band is effectively like the repeat_panel of the repeater object in that it repeats once for each record in the database object being reported on. The OrderBy property specifies the column or columns that the report should use to order the data. The data type is string. This property is not readable nor writeable at run time. ● The developer creates the GroupFooter Band object by dropping the Report Group control onto a report. This band is used to display data at the bottom of each grouped area. ● The PageFooter Band object displays data at the bottom of each printed page of a report. The FirstPgFtr property specifies whether a page footer should be displayed on the first page of the report. The data type is long integer. This property is not readable nor writeable at run time. The LastPgFtr property specifies whether a page footer should be displayed on the last page of the report. The data type is long integer. This property is not readable nor writeable at run time. ● The ReportFooter Band object displays data at the bottom of the report that is considered global to the overall report. Class Objects The class object provides a mechanism for creating reusable objects. Class objects can be as simple as an OK button or as complex as the calendar class that ships with the OPO Sample Applications. Class objects are instanced into an application by dragging them from the application or library window onto the form or report. These instances are linked to the parent at the property and method level. This implies that code written for a parent method will not be shown in the instance but will be executed unless overridden. Figure 40.7 illustrates four classes that are provided with the OPO Sample Applications: the form control, the record control, the meter control, and the calendar class. Figure 40.7. Class objects. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Each of the OPO Sample Application classes illustrated in Figure 40.7 is well documented in the OPO Sample Application online help. If the developer uses the class model illustrated in the OPO Sample help, the developed classes are more usable and maintainable. Class objects represent the real reusable power behind OPO. Class objects support the concepts of encapsulation, inheritance, nested instancing, and polymorphism. You can embed custom business logic and rules within class objects and then standardize them through libraries for use in corporate-wide application development and deployment. A mechanism for embedding custom logic is provided through the capability to create user-defined properties and methods. All the sample class objects provided with the OPO Sample Applications use user-defined properties and methods at various levels. Bitmap Resource Objects The bitmap resource object provides a mechanism for displaying graphic images on buttons, forms, embedded forms, and user-defined classes. There are no properties that can be changed or methods that execute with respect to bitmap resource objects. These objects are not editable or scaleable. Perhaps the best use of bitmap resource objects is for standardization of backgrounds and button icons in corporate-wide applications. Bitmap resource objects stored in an OPO library perform just this function. The OPO Sample Applications provide two libraries dedicated to bitmap resource objects. The Bitmaps library contains 68 bitmaps and the OPOICONS library contains 96 bitmaps. Figure 40.8 illustrates a few of the bitmap resources available from the Bitmaps library. Figure 40.8. Bitmap resource objects. OLE Objects OLE objects provide a mechanism for using the Object Linking and Embedding (OLE) technology developed by Microsoft. You can only use these objects in the Microsoft Windows version of OPO. You can insert the OLE object from the design time menu or instance it from an application or a library. Figure 40.9 displays two OLE objects in the untitled OPO application and instanced onto a form. OLE5 is a PC Paintbrush object. OLE11 is a Microsoft Word 6.0 object with an embedded picture object. OLE objects permit other applications to be embedded within OPO. OPO version 1.0 doesn't have a mechanism for tying the functionality of the OLE object to the database or even to a programmatic reference from within OPO. Due to this interaction limitation, OLE objects in OPO are of minimal value. Figure 40.9. OLE objects. Objects for Building Applications Objects for building applications include data-bound and graphical objects. These building blocks or objects used in conjunction with the application-level objects enable the developer to build custom database applications. Each of these objects is described in the remainder of this section. Each description lists the object's most common uses, its significant properties and methods, and any areas of concern that a developer should be aware of with respect to using the object. Chart Object The chart object is a bindable control for displaying data as a vertical bar, horizontal bar, line graph, or pie graph. The developer cannot drag-and-drop columns from a table onto the chart object because the object would not know whether these columns were x- or y-axis columns. The chart object is not editable in any way with respect to the data it displays. Figure 40.10 displays chart objects displaying the same employee data in various formats. Figure 40.10. Chart objects. You can link the chart object to other record manager objects in master-detail relationships. The developer can make the Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. chart object a detail view of data by setting the LinkDetailColumn, LinkMasterColumn, and LinkMasterForm properties of the chart object. One simple example to set up is to drop the familiar SCOTT/TIGER DEPT table onto a form. Create a chart object with ENAME as ChartXCol and SAL as ChartYCols, set the link properties appropriately on the chart object, and then run the form. The chart object will be the detail of employees per department. Figure 40.10 illustrates this master-detail relationship with the form as master to four detail chart objects. The chart object has many other properties similar to the form object. The following are chart-specific properties of interest: The ChartAutoFormat property specifies whether the y-axis scales to the actual minimum and maximum values or uses the specified minimum and maximum values. The data type is boolean. This property is readable and writeable at run time. The ChartGap property specifies the gap in pixels between groups of bars in horizontal and vertical bar graphs. The data type is long integer. This property is readable and writeable at run time. The ChartLabelStyle property specifies the type of labels beside each bar in a horizontal or vertical bar graph. The data type is long integer. This property is readable and writeable at run time. Possible values are none, values, labels, or categories. The ChartLegendHAlign property specifies that the chart legend should be aligned on the left or right side of the chart object. The data type is long integer. This property is readable and writeable at run time. The ChartLegendVAlign property specifies that the chart legend should be aligned on the top or bottom side of the chart object. The data type is long integer. This property is readable and writeable at run time. The ChartLineStyle property specifies the style of line to use in drawing the chart object. The data type is long integer. This property is readable and writeable at run time. In OPO version 1.0, this property has no effect. The ChartMaxValue property specifies the maximum y-axis value for a vertical bar, horizontal bar, and line graph chart object. The data type is long integer. This property is readable and writeable at run time. The ChartAutoFormat property must be False for this value to have meaning. The ChartMinValue property specifies the minimum y-axis value for a vertical bar, horizontal bar, and line graph chart object. The data type is long integer. This property is readable and writeable at run time. The ChartAutoFormat property must be False for this value to have meaning. The ChartOverlap property specifies the amount of overlap in pixels between the bars in the same group for horizontal and vertical bar graphs. The data type is long integer. This property is readable and writeable at run time. The ChartPieCircle property specifies whether the chart object displays pies as circles or as ovals conforming to the dimensions of the chart object. The data type is boolean. This property is readable and writeable at run time. The ChartRowCount property specifies the maximum number of rows that the chart object will display. The data type is long integer. This property is readable at run time. The default value is zero, which implies all rows will be displayed. Any non-zero value, represented by n, causes the first n records to be displayed. The ChartShowGrid property specifies the type of grid that the chart object should display. The data type is long integer. This property is readable and writeable at run time. Possible values are none, horizontal, vertical, or both. The ChartShowLegend property specifies whether the chart object should display a legend. The data type is boolean. This property is readable and writeable at run time. The ChartStacked property specifies whether vertical and horizontal bar graphs should display data in groups or as a Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. single stacked value. The data type is boolean. This property is readable and writeable at run time. The ChartStyle property specifies the type of chart or graph. The data type is long integer. This property is readable and writeable at run time. Possible values include Vertical Bar, Horizontal Bar, Line, or Pie. The ChartXCol property specifies the name of the column from the database to be used for the x-axis. The data type is string. This property is readable at run time. You must specify this property even if the chart type does not need an x-axis variable. The ChartYCols property specifies the names of the columns from the database to be used for the y-axis. The data type is string. This property is readable at run time. Checkbox Object The checkbox object is a data bound control. The checkbox is typically used to represent a toggle state of values for a particular column in the database. The checkbox is also used to represent a set of mutually exclusive values where one or more values can be chosen at a time from the set of all possible values. Checkbox-specific properties of interest are described as follows: The ValueOff property specifies the value of the control when it is not selected. The data type is set to be the same as the radio button data type. This property is readable and writeable at run time. The default value is null. The ValueOn property specifies the value of the control when it is selected. The data type is set to be the same as the radio button data type. This property is readable and writeable at run time. Combo Box Object The combo box object is a more versatile version of the pop-up object. Although each object allows the user to pick a value from a list, the combo box allows the user to enter values not already in the list. The combo box does not respect the 3D Control style for the DrawStyle property. Figure 40.11 displays three combo boxes; each displays a different type of data. Figure 40.11. Combo box objects. The following are combo box-specific methods and properties of interest: The UpdateList() method must be called programmatically. This method returns no data. UpdateList() is called to update the data within a record manager for a pop-up, combo, or list box control. The ValueList property specifies the list of values that a combo box can display. The data type is string. This property is readable and writeable at run time. There are three methods for setting the values in the ValueList property: 1) create a hard-coded list of one value per line; 2) use table column mapping, which selects all of the values for a specified column from the specified table; and 3) use queried values that a fully qualified SQL statement selects a column from a table using conditions and other SQL operators. In Figure 41.11, the ENAME combo box uses method 1, the HIREDATE combo box uses method 2, and the SAL combo box uses method 3 to populate the ValueList property. Current Row Pointer Object The current row pointer object is used to indicate the status of a record in relation to the database. A gray arrow indicates that the record is the current record but it is not active; a white arrow indicates a separate record. A black arrow indicates that the record is the current record and is also the active record, and a lock beside the arrow indicates that the record has Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... Power Objects s Summary 44 Oracle Basic Power Objects uses Oracle Basic as its programming language Oracle Basic is fully compatible with ANSI BASIC with the additions of object extensions and Structured Query Language (SQL) extensions Oracle chose Basic as the programming language in order to appeal to the widest range of developer experience This chapter discusses when to use Oracle Basic; how to write,... and compile code; and how to extend the functionality of Power Objects through Oracle Basic Refer to the included CD-ROM for Appendix E, "Oracle Power Objects Programming Reference," for a reference on the syntax and purpose of the majority of all the commands and functions comprising Oracle Basic Overview of Oracle Basic Oracle Basic is fully compatible with ANSI BASIC and is therefore also compatible... Next Page Home Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark Previous TOC Page q Next Page Home 44 r Oracle Basic s Overview of Oracle Basic s How to Write, Test, and Compile Oracle Basic Code s Manipulating Data from a Record Manager Using Oracle Basic s Enforcing a Limiting Condition on a Record Manager s Performing Validation s EXEC SQL Operations: Select, Insert, Update,... the method to modify the default behavior using Oracle Basic code Using Oracle Basic, you can create user-defined functions and methods You can declare variables, external commands, and functions and obtain direct access to the data contained in visual and non-visual objects Oracle Basic gives the developer the capability to create those features in the Oracle Power Objects product that he finds are... box, combo box, or popup without using some Oracle Basic code You place this code in either the translation or valuelist property as appropriate For a popup to display employee names while storing employee IDs, you use the following translation for a session called OracleSession pointing to database objects owned by the Oracle database account SCOTT/TIGER: =AT OracleSession SELECT ename, empno FROM emp... those features in the Oracle Power Objects product that he finds are missing or incomplete How to Write, Test, and Compile Oracle Basic Code In order to use Oracle Basic effectively, you must understand how to write code, how to test your code, and how to compile the final application Oracle Basic code always exists within a method definition, subroutine, or function You expand the method where you want... rolls back the entire transaction set last committed for a single session, and RollbackForm() rolls back the work in all sessions represented on a form Referential Integrity Enforcement by the Application Oracle Power Objects goes far beyond the non-data-centric capabilities of other products such as Microsoft Visual Basic, Microsoft Access, and PowerSoft PowerBuilder in enforcing multiple levels of application-based... Orphan Details, and the original DEPTNO is 10, but the user changes it to 11 The detail records are "orphaned" as reflected in Figure 41.14 Figure 41.14 Orphan details referential integrity Summary The Oracle Power Objects Form Designer coupled with the built-in transaction processing, application-enforced referential integrity support, and the overall data-centric orientation of the object model is... Next Page Home 42 r Creating Reports s Overview of the Report Designer s The Report Designer Sections s Building a Basic Report s Adding Functionality to Reports s Summary 42 Creating Reports Within an Oracle Power Objects (OPO) application, reports represent data or graphical screens that can be printed Reports are designed with the Report Designer, which is extremely similar to the Form Designer with... containing Basic code If none of the startup methods contain Basic code, execution will not be stopped The third method is to use the STOP command This method is documented but does not actually work in Oracle Power Objects Version 1.0 If you use the STOP command and run the application, once the run-time environment encounters the STOP command, it generates a Basic error, BAS-00322: General syntax error . specified item in a menu. OCX Object An OCX object is a custom object imported into Oracle Power Objects. OCX objects are defined by Microsoft standards. The OCX. characteristics including command code, bitmap, button style, and help context. Summary Oracle Power Objects is a product that makes developing database applications

Ngày đăng: 15/12/2013, 05:15

TỪ KHÓA LIÊN QUAN

w