|
pfc_propertyapplyimmediate
|
|
Full name
|
pfc_u_tabpg_dwproperty_services.pfc_propertyapplyimmediate
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_propertyapplyimmediate(string,boolean)
|
Name
|
Datatype
|
lb_currentstate
|
boolean
|
li_cnt
|
integer
|
li_obj
|
integer
|
li_rc
|
integer
|
li_upper
|
integer
|
event pfc_propertyapplyimmediate;call super::pfc_propertyapplyimmediate;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_PropertyApplyImmediate
//
// Arguments:
// as_servicename The name of the service which needs to be applied.
// ab_desiredstate The state(T/F) to which the service should be set.
//
// Returns: Integer
// 1 = The state was changed.
// 0 = The state was already on the desired setting.
// -1 = Error
// -2 = The service was not recognized. Must likely this is an object on the extension layers.
//
// Description: Change the setting for the service.
//
// *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_rc
integer li_upper
integer li_cnt
integer li_obj
boolean lb_currentstate
// Check required reference.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
// Loop to determine if the Object is one of the PFC objects.
li_upper = UpperBound (is_object)
For li_cnt = 1 to li_upper
If as_servicename = is_object[li_cnt] Then
li_obj = li_cnt
Exit
End If
Next
// Check if object was found in PFC objects loop.
If li_obj > 0 Then
Choose Case li_obj
// If the current and desired state do not match, change to the desired state.
Case DDCALCULATOR
lb_currentstate = (IsValid(idw_requestor.iuo_calculator))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetDropDownCalculator(ab_desiredstate)
Return 1
End If
Return 0
Case DDCALENDAR
lb_currentstate = (IsValid(idw_requestor.iuo_calendar))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetDropDownCalendar(ab_desiredstate)
Return 1
End If
Return 0
Case DDSEARCH
lb_currentstate = (IsValid(idw_requestor.inv_dropdownsearch))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetDropDownSearch(ab_desiredstate)
Return 1
End If
Return 0
Case FILTER
lb_currentstate = (IsValid(idw_requestor.inv_filter))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetFilter(ab_desiredstate)
Return 1
End If
Return 0
Case FIND
lb_currentstate = (IsValid(idw_requestor.inv_find))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetFind(ab_desiredstate)
Return 1
End If
Return 0
Case LINKAGE
lb_currentstate = (IsValid(idw_requestor.inv_linkage))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetLinkage(ab_desiredstate)
Return 1
End If
Return 0
Case MULTITABLE
lb_currentstate = (IsValid(idw_requestor.inv_multitable))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetMultitable(ab_desiredstate)
Return 1
End If
Return 0
Case PRINTPREVIEW
lb_currentstate = (IsValid(idw_requestor.inv_printpreview))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetPrintPreview(ab_desiredstate)
Return 1
End If
Return 0
Case QUERYMODE
lb_currentstate = (IsValid(idw_requestor.inv_querymode))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetQueryMode(ab_desiredstate)
Return 1
End If
Return 0
Case REPORT
lb_currentstate = (IsValid(idw_requestor.inv_report))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetReport(ab_desiredstate)
Return 1
End If
Return 0
Case REQCOLUMN
lb_currentstate = (IsValid(idw_requestor.inv_reqcolumn))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetReqColumn(ab_desiredstate)
Return 1
End If
Return 0
Case RESIZE
lb_currentstate = (IsValid(idw_requestor.inv_resize))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetResize(ab_desiredstate)
Return 1
End If
Return 0
Case ROWMANAGER
lb_currentstate = (IsValid(idw_requestor.inv_rowmanager))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetRowManager(ab_desiredstate)
Return 1
End If
Return 0
Case ROWSELECT
lb_currentstate = (IsValid(idw_requestor.inv_rowselect))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetRowSelect(ab_desiredstate)
Return 1
End If
Return 0
Case SORT
lb_currentstate = (IsValid(idw_requestor.inv_sort))
If lb_currentstate <> ab_desiredstate Then
li_rc = idw_requestor.of_SetSort(ab_desiredstate)
Return 1
End If
Return 0
Case Else
// A supposedly PFC object that is not known?
Return -1
End Choose
End If
// Not recognized.
Return -2
end event