|
pfc_propertystart
|
|
Full name
|
pfc_u_tab_dwproperty_srv.pfc_propertystart
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_propertystart(n_cst_dwpropertyattrib)
|
Name
|
Datatype
|
la_rc
|
Any
|
li_cnt
|
Integer
|
li_rc
|
Integer
|
li_upper
|
Integer
|
lnv_propertyattrib
|
n_cst_propertyattrib
|
lw_parent
|
window
|
event pfc_propertystart;call super::pfc_propertystart;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_PropertyStart
//
// Arguments:
// anv_attrib The datawindow property attributes.
//
// Returns: Integer
// 1 = successful
// -1 = Error
//
// Description:
// Start the object, Create the appropriate pages for the service, And call
// the 'Initialize' process for any specific functionality.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_rc
Any la_rc
Integer li_upper
Integer li_cnt
window lw_parent
n_cst_propertyattrib lnv_propertyattrib
// Validate.
If IsNull(anv_attrib) or Not IsValid(anv_attrib) Then
Return -1
End If
If IsNull(anv_attrib.idw_requestor) or Not IsValid(anv_attrib.idw_requestor) Then
Return -1
End If
// Store the Attributes.
inv_attrib = anv_attrib
// Get the Requestor reference.
idw_requestor = inv_attrib.idw_requestor
// Set the Window title.
of_GetParentWindow(lw_parent)
If IsValid(lw_parent) Then
lw_parent.Title = inv_attrib.is_objectname + ' Properties'
End If
// Create the appropriate page(s) for the service.
li_rc = this.Event pfc_PropertyCreatePages(inv_attrib.is_tabpages)
If li_rc <=0 Then Return -1
// Determine if the Syntax page is desired.
If Len(Trim(is_syntaxtappg)) > 0 Then
// Create the Syntax page.
li_upper = Upperbound(iuo_tappage)
If li_upper > 0 Then
li_upper ++
li_rc = OpenTab(iuo_tappage[li_upper], is_syntaxtappg, 0)
If li_rc <= 0 or IsNull(iuo_tappage[li_upper]) Or Not IsValid(iuo_tappage[li_upper]) Then
Return -1
End If
// Set the Tab Text.
li_rc = iuo_tappage[li_upper].of_GetPropertyInfo(lnv_propertyattrib)
iuo_tappage[li_upper].Text = lnv_propertyattrib.is_propertytabtext
If Len(iuo_tappage[li_upper].Text)=0 Then iuo_tappage[li_upper].Text = is_syntaxtext
End If
End If
// Loop through all the tab pages.
For li_cnt = 1 to li_upper
la_rc = iuo_tappage[li_cnt].Dynamic Event pfc_PropertyStart(inv_attrib)
If ClassName(la_rc) = 'integer' or ClassName(la_rc)='long' Then
// The pfc_PropertyStart was found, validate the return code.
If la_rc < 0 Then Return -1
End If
Next
// Call the 'Initialize process'.
li_rc = this.Event pfc_PropertyInitialize(inv_attrib)
If li_rc <=0 Then Return -1
Return 1
end event