|Oracle® Outside In Viewer for ActiveX Developer's Guide
Part Number E12847-05
This section describes additional topics on the use of the Outside In Viewer for ActiveX.
This chapter includes the following sections:
Outside In uses a technique known as read-ahead in order to cache pages of text in memory for faster display. There are three elements that control this process. If the property SystemReadAhead (see Section A.2.97, "SystemReadAhead") is set to FALSE, then the process which reads and caches the next few pages will be disabled. This means that there could be noticeable delays in the view refresh as the user scrolls through the document. It can also cause unusual scroll bar behavior.
When SystemReadAhead is enabled, the SystemTimer property (see Section A.2.98, "SystemTimer") is a Boolean value that turns all background processing, including read-ahead, on and off. If the SystemTimer property is turned off, read-ahead can be controlled by the programmer by calling the SystemIdle method (see Section A.3.45, "SystemIdle") to allow the viewer to perform background tasks such as read-ahead, caret blinking and auto-scroll.
There are two types of errors that can be generated by the ActiveX control. Errors, which occur due to incorrect use of the control, will be caught by the system and will generate an OLE exception. Errors that occur due to invalid parameter content (for example, missing files) will generate an Error event. By default the ErrorShowMsg property (see Section A.2.38, "ErrorShowMsg") is set to TRUE and will display error messages as they occur. The property can be set to FALSE to disable this reporting. In either case, the Error event will be generated.
The Error event handler may access the ErrorCode and ErrorMsg properties (see Section A.2.36, "ErrorCode," and Section A.2.37, "ErrorMsg") to determine the nature of the error. The ErrorMsg is a BSTR variable and can be used to display errors as the developer sees fit.
Private Sub oixctrl1_Error() Rem ** Error event handler for viewer Dim Text As String Select Case oixctrl1.ErrorCode Case SCCERR_ALLOCFAILED: Text = "SCCERR:" + oixctrl1.ErrorMsg Case SCCERR_INSUFFICIENTBUFFER: Text = "SCCERR:" + oixctrl1.ErrorMsg Case SCCERR_MEMORYLEAK: Text = "SCCERR:" + oixctrl1.ErrorMsg Case SCCERR_MEMTABLEFULL: Text = "SCCERR:" + oixctrl1.ErrorMsg End Select MsgBox Text, vbOKOnly, "Outside In Error" End Sub