|
pfc_propertysyntax
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvcalculator.pfc_propertysyntax
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_propertysyntax()
|
Name
|
Datatype
|
lb_desired
|
boolean
|
li_cnt
|
integer
|
li_desiredstyle
|
integer
|
li_index
|
integer
|
li_rc
|
integer
|
li_row
|
integer
|
li_rowcount
|
integer
|
li_upper
|
integer
|
lnv_conversion
|
n_cst_conversion
|
ls_column
|
string
|
ls_desiredstyle
|
string
|
ls_syntax
|
string
|
event pfc_propertysyntax;call super::pfc_propertysyntax;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_propertysyntax
//
// Access: Public
//
// Arguments: None
//
// Returns: String
// The syntax required to create the currently selections.
// '!' in error
//
// Description:
// Create the required syntax to match the current selections.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_rowcount
integer li_row
string ls_column
integer li_desiredstyle
integer li_upper
integer li_cnt
integer li_rc
integer li_index
string ls_syntax
boolean lb_desired
string ls_desiredstyle
n_cst_conversion lnv_conversion
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return '!'
End If
If IsNull(idw_requestor.iuo_calculator) or Not IsValid(idw_requestor.iuo_calculator) Then
Return '!'
End If
// -- Start the service. --
ls_syntax += 'This.of_SetDropDownCalculator(TRUE)~r~n'
// -- Initial Value. --
lb_desired = cbx_initialvalue.Checked
ls_syntax += '~r~nThis.iuo_calculator.of_SetInitialValue('+lnv_conversion.of_String(lb_desired)+')'
// -- Close on Click. --
lb_desired = cbx_closeonclick.Checked
ls_syntax += '~r~nThis.iuo_calculator.of_SetCloseOnClick('+lnv_conversion.of_String(lb_desired)+')'
// -- Register Columns. --
li_rowcount = dw_register.RowCount()
For li_row = 1 to li_rowcount
lb_desired = (dw_register.object.register.primary[li_row] = 'Y')
If lb_desired THEN
ls_column = dw_register.object.columnname.primary[li_row]
li_desiredstyle = dw_register.object.style.primary[li_row]
Choose Case li_desiredstyle
Case idw_requestor.iuo_calculator.NONE
ls_desiredstyle = 'iuo_calculator.NONE'
Case idw_requestor.iuo_calculator.DDLB
ls_desiredstyle = 'iuo_calculator.DDLB'
Case idw_requestor.iuo_calculator.DDLB_WITHARROW
ls_desiredstyle = 'iuo_calculator.DDLB_WITHARROW'
Case Else
ls_desiredstyle = String(li_desiredstyle)
End Choose
ls_syntax += '~r~nThis.iuo_calculator.of_Register("'+ls_column+'",'+ls_desiredstyle+')'
End If
Next
Return ls_syntax
end event