pfc_propertypopulate


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvcalculator   >   pfc_propertypopulate   

Full name pfc_u_tabpg_dwproperty_srvcalculator.pfc_propertypopulate
Access public
Extend of integer
Return value integer
Prototype event integer pfc_propertypopulate()

Name Datatype
No Data

Name Datatype
li_cntall integer
li_cntreg integer
li_index integer
li_rc integer
li_registeredgui integer[]
li_row integer
li_style integer
li_upperall integer
li_upperreg integer
ls_allcols string[]
ls_registeredcols string[]

event pfc_propertypopulate;call super::pfc_propertypopulate;//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		pfc_properypopulate
//
//	Access:    		Public
//
//	Arguments:  	None
//
//	Returns:   		Integer
//   1 if it succeeds.
//	 -1 if an error occurs.
//
//	Description:  	
//	Populate the screen edit controls with the current service values.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_upperall, li_upperreg
integer	li_cntall, li_cntreg
integer 	li_rc
integer	li_style
integer	li_index
integer	li_row
string	ls_allcols[]
string	ls_registeredcols[]
integer	li_registeredgui[]

// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
	Return -1
End If
If IsNull(idw_requestor.iuo_calculator) or Not IsValid(idw_requestor.iuo_calculator) Then
	Return -1
End If

// Determine if InitialValue is enabled.
cbx_initialvalue.Checked = idw_requestor.iuo_calculator.of_IsInitialValue()

// Determine if Close on Click is enabled.
cbx_closeonclick.Checked = idw_requestor.iuo_calculator.of_IsCloseOnClick()

// Get all the columns the calculator object could sevice.
li_rc = idw_requestor.iuo_calculator.of_GetRegisterable(ls_allcols)
// Get all the registered columns.
li_rc = idw_requestor.iuo_calculator.of_GetRegistered(ls_registeredcols, li_registeredgui)
// Add All of the columns and Select the Registered columns
li_upperall = UpperBound(ls_allcols)
li_upperreg = UpperBound(ls_registeredcols)
For li_cntall = 1 to li_upperall
	li_row = dw_register.InsertRow(0)
	If li_row > 0 Then
		dw_register.object.columnname.primary[li_row] = ls_allcols[li_cntall]
		dw_register.object.style.primary[li_row] = 1
		// Determine if this is an registered column.
		For li_cntreg = 1 to li_upperreg
			If ls_allcols[li_cntall] = ls_registeredcols[li_cntreg] Then
				dw_register.object.register.primary[li_row] = 'Y'
				dw_register.object.style.primary[li_row] = li_registeredgui[li_cntreg]
				Exit
			End If
		Next
	End If
Next

Return 1

end event

     
Name Owner
No Data

     
Name Owner
datawindow.insertrow datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions
pfc_u_calculator.of_getregistered pfc_u_calculator
pfc_u_calculator.of_IsCloseOnClick pfc_u_calculator
pfc_u_calculator.of_GetRegisterable pfc_u_calculator
pfc_u_calculator.of_IsInitialValue pfc_u_calculator
pfc_u_tabpg_dwproperty_base.pfc_propertypopulate pfc_u_tabpg_dwproperty_base

     
Full name
pfc_u_tabpg_dwproperty_srvcalculator

     
Name Scope
No Data