Oracle
Video Client Software Guide Release 2.1.8 A42334_4 |
|
This chapter is intended for developers who want to use the Oracle Video Custom Control OCX (OLE Custom Extension) to add video capabilities to their Oracle Forms applications.
Although there are no functional differences in the Oracle Video Custom Control between Oracle Forms and Oracle Power Objects (or Microsoft Visual Basic), there are some substantial differences in how to load and use the Oracle Video Custom Control from Oracle Forms.
For information on the methods, properties, and events provided by the Oracle Video Custom Control, see Chapter 4, Oracle Video Custom Control.
This chapter contains these sections:
To use the Oracle Video Custom Control with Oracle Forms, you need Oracle Forms v4.5.7, which is a component of Oracle Developer/2000, release 1.3.
This example uses the Oracle Video Custom Control to create a simple application which enables users to view, select, and play videos from a local hard disk or the Oracle Video Server. To see this same application created in Oracle Power Objects and Visual Basic, see Chapter 3, Oracle Video Custom Control.
When you initially create the Oracle Video Custom Control object, you will not be able to modify the properties of the object until you deselect it (by clicking anywhere else on the screen) and then re-select it.
declare
video_obj ole2.obj_type;
begin
video_obj := forms_ole.get_interface_pointer (`MY_VIDEO');ole2.invoke(video_obj,`ImportFileAs');
end;
declarevideo_obj ole2.obj_type;
When working with forms, the commands in the PL/SQL scripts that work with the Oracle Video Custom control take different forms depending on whether they are:
For buttons that execute a method, the PL/SQL script for the WHEN-BUTTON-PRESSED trigger should follow this form:
declare video-obj ole2.obj_type; begin video-obj := forms_ole.get_interface_pointer('OLE-object-name'); ole2.invoke(video-obj, 'method'); end;
is the name of the method to invoke (such as play, stop, and so on).
For buttons that set a property, the PL/SQL script for the WHEN-BUTTON-PRESSED trigger should follow this form:
declare video-obj ole2.obj_type; begin video-obj := forms_ole.get_interface_pointer('OLE-object-name'); ole2.set_property(video-obj, 'property','value') end;
is the name of the property to be set (such as ShowControls).
is the value to be assigned to the property (such as True or False).
For buttons that get the numeric value of a property, the PL/SQL script for the WHEN-BUTTON-PRESSED trigger should follow this form:
declare video-obj ole2.obj_type; variable num; begin video-obj := forms_ole.get_interface_pointer('OLE-object-name'); variable = ole2.get_num_property(video-obj, 'num-property') end;
When getting the string value of a property, the script should follow this form:
declare video-obj ole2.obj_type; variable char; begin video-obj := forms_ole.get_interface_pointer('OLE-object-name'); variable = ole2.get_char_property(video-obj, 'char-property') end;
is the name of a that returns a character value (such as ImportFileSpec).
is the name of a property that returns a numeric value (such as LengthTime).
To set the Oracle Video Custom Control properties, click the primary mouse button in the Oracle Video Custom Control object, then drag down to the Oracle Video Control Object->Properties...
If you double click on the Oracle Video Custom Control object, you will get an Oracle Forms properties dialog, but you cannot set the Oracle Video Custom Control properties from this dialog.
If you set any visual properties (such as ShowControls) to False, the controls disappear in the designer, but the change will not be reflected at run time. To see the changes in the run time, you must close the Layout Editor to save the changes, run the form, then it will work.
When using Oracle Forms, you might receive this run-time error:
FRM-41344: OLE object not defined for object in current record.
which can occur for either of these reasons:
To fix this problem, go into the Forms Designer, and re-insert the Oracle Video Custom Control by clicking the right mouse button inside the OLE container and choosing Insert Object
To fix this problem, modify the form so that it can navigate to the block that contains the Oracle Video Custom Control. You can either make this block the first block on the form or add a GO_BLOCK command in the WHEN-NEW-FORM-INSTANCE script to navigate to that block. If necessary, you can add a GO_BLOCK command followed by SYNCHRONIZE before any commands that access the Oracle Video Control. (You can tell if the Oracle Video Control has been initialized because the video control buttons will be visible.)
|
Copyright © 1997 Oracle Corporation. All Rights Reserved. |
|