This section describes the functions of the Oracle Forms Open API Block object.
d2fblkcr_Create( d2fctx *pd2fctx, d2fob *parent, d2fblk **ppd2fblk, text *name );
This function creates a block. You specify a pointer to the context in pd2fctx, , a pointer to the parent of the new block object in parent, a handle for the function to store the newly-created block object in ppd2fblk, and a pointer to name, for the name of the new object.
This function returns D2FS_SUCCESS if it is able to create a new block in ppd2fblk.
d2fblkde_Destroy( d2fctx *pd2fctx, d2fblk *pd2fblk );
This function destroys the specified block. You specify a pointer to the context in pd2fctx and a pointer to the block object you want to destroy in pd2fblk.
d2fblkdu_Duplicate( d2fctx *pd2fctx, d2fob *new_parent, d2blk *pd2fblk_src, d2fblk **ppd2fblk_dst, text *new_name );
This function duplicates the specified block. You specify a pointer to the context in pd2fctx, a pointer to the new parent in new_parent, a pointer to the block source in pd2fblk_src, a handle for the function to store the destination in ppd2fblk_dst, and a pointer for the name of the new block (new_name).
This function returns D2FS_SUCCESS if it is able duplicate the specified block and place it in the ppd2fblk_dst location.
d2fblkco_CompileObj( d2fctx *pd2fctx, d2fblk *pd2fblk );
This function compiles all of the PL/SQL code associated with the specified block. You specify a pointer to the context in pd2fctx and a pointer to the object you want to compile in pd2fblk.
For example, you might use this function to compile all of the trigger objects attached to a block, and all of the trigger objects attached to all item objects in a block.
d2fblkgb_GetBoolProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, boolean *pprp );
This function retrieves a property of type boolean for the specified block. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, the property number in pnum, and a pointer to pprp, to store the boolean property value.
This function returns D2FS_SUCCESS if it stores the value of the boolean property in pprp.
d2fblkgn_GetNumProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, number *pprp );
This function retrieves a property of type number (an actual scalar constant) for the specified block. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, the property number in pnum, and a pointer to pprp, to store the numeric property value.
This function returns D2FS_SUCCESS if it stores the value of the number property in pprp.
d2fblkgt_GetTextProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, text **pprp );
This function retrieves a property of type text for the specified block. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, the property number in pnum, and a handle to an array of characters for the function to store the text property value in pprp.
This function returns D2FS_SUCCESS if it fills the supplied array with a copy of the text property value for the specified block in pprp.
Note that the client is responsible for freeing the text returned by this function.
d2fblkgo_GetObjectProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, dvoid **pprp );
This function retrieves a property of type object of the specified block. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, a property number in pnum, and a handle to pprp, for the function to store the object property value.
This function returns D2FS_SUCCESS if it stores a handle to the desired object property in pprp.
d2fblkgp_GetBlobProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, dvoid **pprp );
This function retrieves the value from the client-specified handle. You specify a pointer to the context in pd2fctx, a pointer to the block object in pd2fblk, a property number in pnum, and a handle to pprp, for the function to provide access to the client-specified value.
This function returns D2FS_SUCCESS if it stores a handle to the desired client-specified property in pprp.
d2fblksb_SetBoolProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, boolean prp );
This function sets the value of the specified block boolean property. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, the property number in pnum, and the boolean value in prp.
This function returns D2FS_SUCCESS if it sets the boolean property with the value you specify in prp.
d2fblksn_SetNumProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, number prp );
This function sets the value of the specified block number property. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, the property number in pnum, and the number value in prp.
This function returns D2FS_SUCCESS if it sets the number property with the value you specify in prp.
d2fblkst_SetTextProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, text *prp );
This function sets the value of the specified block text property. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, the property number in pnum, and a pointer to the text value in prp.
This function returns D2FS_SUCCESS if it sets the specified text property with the value stored in prp.
d2fblkso_SetObjectProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, dvoid *prp );
This function sets the object of the specified block property. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, a property number in pnum, and a pointer to the object property value in prp.
This function returns D2FS_SUCCESS if it sets the specified object property with the value stored in prp.
d2fblksp_SetBlobProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum, dvoid *prp );
This function sets the client-specified handle. You specify a pointer to the context in pd2fctx, a pointer to the block object in pd2fblk, a property number in pnum, and a pointer to the client-specified value in prp.
This function returns D2FS_SUCCESS if it sets the client-specified handle with the value stored in prp.
d2fblkhp_HasProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum );
This function queries the specified block for the specified property. You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, and a property number in pnum.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the object has the specified property; otherwise, the function can return a number of possible return values, depending on the circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
d2fblkip_InheritProp( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum );
This function enables the specified block to inherit the specified property. You specify a pointer to the context in pd2fctx, a pointer to the block object in pd2fblk, and the property number in pnum.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the object has been modified to inherit the specified property; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
d2fblkii_IspropInherited( d2fctx *pd2fctx, d2fblk *pd2fblk, ub2 pnum );
This function verifies that the specified object’s property is inherited, as is, from its parent object. You specify a pointer to the context in pd2fctx, a pointer to the block object in pd2fblk, and the property number in pnum.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the property is inherited from the specified object’s parent; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
d2fblksc_SubClass( d2fctx *pd2fctx, d2fblk *pd2fblk, d2fob *parent, boolean keep_path);
This function returns D2FS_YES if the specified block (pd2fblk) becomes a subclass of the specified parent (parent). You specify a pointer to the context in pd2fctx, a pointer to the block in pd2fblk, a pointer to the parent object in parent, and a boolean flag to indicate if the function saves the path to the parent object in keep_path.
Note that the Forms API uses the boolean keep_path argument to save the actual path information. It is recommended that you do not set keep_path to TRUE since this information may be lost if you move to another machine. If keep_path is set to TRUE, the Forms API saves the actual path in the .fnb file. Therefore, the next time the form is loaded, depending on how the environment variable Forms 4.5 or 5.0 path is defined, the Forms API searches for the parent form in one of the specified directories defined by the environment variable.
d2fblkis_IsSubclassed ( d2fctx *pd2fctx, d2fblk *pd2fblk );
This function verifies that the specified object is a subclass of another object. You specify a pointer to the context in pd2fctx and a pointer to the block object in pd2fblk.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the specified object is a subclass of another object; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
Creating modules using the Open API