|
pfc_propertypopulate
|
|
Full name
|
pfc_u_tabpg_dwproperty_services.pfc_propertypopulate
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_propertypopulate()
|
Name
|
Datatype
|
li_cnt
|
Integer
|
li_row
|
Integer
|
li_upper
|
Integer
|
ls_enabled
|
String
|
ls_yesno
|
String
|
event pfc_propertypopulate;call super::pfc_propertypopulate;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_PropertyPopulate
//
// Arguments: None
//
// Returns: Integer
// 1 = successful
// -1 = Error
//
// Description: Populate the current service settings on to the visual datawindow.
//
// *Note: This should be extended to support non-PFC services.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_row
Integer li_upper
Integer li_cnt
String ls_yesno
String ls_enabled
// Validate the required reference.
If IsNull(idw_requestor) Or Not IsValid(idw_requestor) Then
Return -1
End If
// Populate the desired name and description for each service.
this.Event pfc_PropertyLoad()
li_upper = UpperBound(is_object)
For li_cnt = 1 to li_upper
If Len(is_object[li_cnt]) > 0 Then
li_row = dw_services.InsertRow(0)
If li_row > 0 Then
dw_services.Object.servicename.Primary[li_row] = is_object[li_cnt]
dw_services.Object.servicedescription.Primary[li_row] = is_description[li_cnt]
dw_services.Object.serviceclassname.Primary[li_row] = is_classname[li_cnt]
dw_services.Object.servicepropertypages.Primary[li_row] = is_propertypages[li_cnt]
If ib_switchbuttons[li_cnt] Then ls_yesno='Y' Else ls_yesno='N'
dw_services.Object.serviceswitchbuttons.Primary[li_row] = ls_yesno
ls_enabled = SERVICE_DISABLED // Initialize
Choose Case li_cnt
Case DDCALCULATOR
If IsValid(idw_requestor.iuo_calculator) Then ls_enabled = SERVICE_ENABLED
Case DDCALENDAR
If IsValid(idw_requestor.iuo_calendar) Then ls_enabled = SERVICE_ENABLED
Case DDSEARCH
If IsValid(idw_requestor.inv_dropdownsearch) Then ls_enabled = SERVICE_ENABLED
Case FILTER
If IsValid(idw_requestor.inv_filter) Then ls_enabled = SERVICE_ENABLED
Case FIND
If IsValid(idw_requestor.inv_find) Then ls_enabled = SERVICE_ENABLED
Case LINKAGE
If IsValid(idw_requestor.inv_linkage) Then ls_enabled = SERVICE_ENABLED
Case MULTITABLE
If IsValid(idw_requestor.inv_multitable) Then ls_enabled = SERVICE_ENABLED
Case PRINTPREVIEW
If IsValid(idw_requestor.inv_printpreview) Then ls_enabled = SERVICE_ENABLED
Case QUERYMODE
If IsValid(idw_requestor.inv_querymode) Then ls_enabled = SERVICE_ENABLED
Case REPORT
If IsValid(idw_requestor.inv_report) Then ls_enabled = SERVICE_ENABLED
Case REQCOLUMN
If IsValid(idw_requestor.inv_reqcolumn) Then ls_enabled = SERVICE_ENABLED
Case RESIZE
If IsValid(idw_requestor.inv_resize) Then ls_enabled = SERVICE_ENABLED
Case ROWMANAGER
If IsValid(idw_requestor.inv_rowmanager) Then ls_enabled = SERVICE_ENABLED
Case ROWSELECT
If IsValid(idw_requestor.inv_rowselect) Then ls_enabled = SERVICE_ENABLED
Case SORT
If IsValid(idw_requestor.inv_sort) Then ls_enabled = SERVICE_ENABLED
End Choose
dw_services.Object.serviceenabled.Primary[li_row] = ls_enabled
End If
End If
Next
// Refresh the description.
this.Event pfc_PropertyDescription()
// Refresh the available buttons.
this.Event pfc_PropertyEnableButtons()
Return 1
end event