|
of_setrequestor
|
|
Full name
|
pfc_u_calendar.of_setrequestor
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_setrequestor(dragobject)
|
Name
|
Datatype
|
lb_dropdownbehavior
|
boolean
|
ldrg_notvalid
|
dragobject
|
lem_testonly
|
editmask
|
public function integer of_setrequestor (dragobject adrg_requestor);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_SetRequestor
//
// Access: Public
//
// Arguments:
// adrg_requestor The object requesting the service.
// Valid objects are DataWindow! and dropdownlistbox!.
//
// Returns: Integer
// 1 if it succeeds
// -1 if an error occurs.
// -2 if attempting to associate object where only dropdowns are supported.
// -3 MaskDataType is incorrect.
//
// Description: Associates an object control with this object
// by setting the requestor instance variable(s).
// The valid objects which can be associated are of type datawindow and
// type editmask. Editmask type should further have a mask of
// type DateMask!.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
dragobject ldrg_notvalid
editmask lem_testonly
boolean lb_dropdownbehavior
// Validate Reference.
If IsNull(adrg_requestor) or Not IsValid(adrg_requestor) Then
Return -1
End If
// Invalidate references.
idrg_requestor = ldrg_notvalid
idw_requestor = ldrg_notvalid
iem_requestor = ldrg_notvalid
// Is this object behaving as a dropdown object.
If IsValid(inv_dropdown) Then
lb_dropdownbehavior = True
End If
// Make sure it is one of the expected type and get the
// parent window reference.
CHOOSE CASE TypeOf(adrg_requestor)
CASE DataWindow!
If Not lb_dropdownbehavior Then
// Not supported for datawindow controls.
Return -2
End If
idw_requestor = adrg_requestor
CASE EditMask!
lem_testonly = adrg_requestor
If lem_testonly.MaskDataType <> DateMask! Then
Return -3
End If
iem_requestor = adrg_requestor
If Not lb_dropdownbehavior Then
// Field cannot be typed on.
iem_requestor.DisplayOnly = True
// Set initial value.
of_Reset()
End If
CASE ELSE
Return -1
END CHOOSE
// Set the generic reference.
idrg_requestor = adrg_requestor
Return 1
end function
Name
|
Owner
|
powerobject.typeof |
powerobject
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
pfc_u_calendar.of_reset |
pfc_u_calendar
|