of_openpropertyservice


pfcutil.pbl   >   pfc_n_cst_dwsrv_property   >   of_openpropertyservice   

Full name pfc_n_cst_dwsrv_property.of_openpropertyservice
Access public
Extend of integer
Return value integer
Prototype public function integer of_openpropertyservice(powerobject)

Name Datatype
No Data

Name Datatype
lb_defined boolean
li_rc integer
li_tabcnt integer
li_uppertab integer
lnv_attrib n_cst_dwpropertyattrib
lnv_metaclass n_cst_metaclass
lnv_propertyattrib n_cst_propertyattrib
ls_args string[]
ls_pages string
lw_parentwindow window

public function integer of_openpropertyservice (powerobject apo_service);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		
//	of_OpenPropertyService
//
//	Access:  		public
//
//	Parameters:
//	apo_service	The valid service for which to open the Property Service window.
//
//	Returns:  	integer
//	Return value of OpenWithParm PowerBuilder call.
//	-1 In error.
//
//	Description:	
//	Opens the Property Service window for the passed in service.
//
// Note:
//	The service desired must be started.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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
integer	li_tabcnt
integer	li_uppertab
string	ls_pages
string	ls_args[]
boolean	lb_defined
window	lw_parentwindow
n_cst_propertyattrib	lnv_propertyattrib
n_cst_dwpropertyattrib	lnv_attrib
n_cst_metaclass	lnv_metaclass

SetPointer(HourGlass!)

// Validate argument
If IsNull(apo_service) Or Not IsValid(apo_service) Then
	Return -1
End If

// Validate required references.
If IsNull(idw_requestor) Or Not IsValid(idw_requestor) Then
	// Notice that this function is not applicable for the shared instance
	// since the idw_requestor is not set for it.
	Return -1
End If

// Determine if it is OK to call for the attributes.
//ls_args = {'ref n_cst_propertyattrib'}
//lb_defined = lnv_metaclass.of_isFunctionDefined &
//	(apo_service.ClassDefinition, "of_GetPropertyInfo", ls_args)
//If Not lb_defined Then
//	Return -1
//End If

// Make a Dynamic call to get the attributes.
li_rc = apo_service.Dynamic of_GetPropertyInfo(lnv_propertyattrib)
If li_rc < 0 Then Return -1
	
// -- Gather the attributes. --

// Set dw object.
lnv_attrib.idw_requestor = idw_requestor

// Get the service name.
lnv_attrib.is_objectname = lnv_propertyattrib.is_name
If Len(Trim(lnv_attrib.is_objectname)) = 0 Then 
	lnv_attrib.is_objectname = apo_service.ClassName()
End If		

// Create tab delimited list of desired tabpages.
li_uppertab = UpperBound(lnv_propertyattrib.is_propertypage)
For li_tabcnt = 1 to li_uppertab
	If li_tabcnt > 1 Then ls_pages += '~t'
	ls_pages += lnv_propertyattrib.is_propertypage[li_tabcnt]
Next
lnv_attrib.is_tabpages = ls_pages

// Get the parent window ref so that the new window can open in relation to it.
idw_requestor.of_GetParentWindow(lw_parentwindow)
If IsValid(lw_parentwindow) Then
	lnv_attrib.iw_main = lw_parentwindow
End If

// Allow structure to have other values set before opening dialog.
idw_requestor.Event pfc_preproperties(lnv_attrib)
		
// Open the Property window.
Return OpenWithParm (iw_propertyservices, lnv_attrib)
end function

     
Name Owner
No Data

     
Name Owner
powerobject.classname powerobject
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.len systemfunctions
systemfunctions.openwithparm systemfunctions
systemfunctions.setpointer systemfunctions
systemfunctions.trim systemfunctions
systemfunctions.upperbound systemfunctions
pfc_u_dw.of_GetParentWindow pfc_u_dw
pfc_u_dw.pfc_preproperties pfc_u_dw

     
Full name
No Data

     
Name Scope
No Data