of_GetRegisterable


pfcmain.pbl   >   pfc_u_calendar   >   of_GetRegisterable   

Full name pfc_u_calendar.of_GetRegisterable
Access public
Extend of integer
Return value integer
Prototype public function integer of_GetRegisterable(ref string[])

Name Datatype
No Data

Name Datatype
li_colcount integer
li_count integer
li_i integer
ls_allcolumns string[]
ls_colname string
ls_coltype string
ls_editstyle string

public function integer of_GetRegisterable (ref string as_allcolumns[]);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_GetRegisterable
//
//	Access:  		public
//
//	Arguments:
//	as_allcolumns[] By Reference.  All columns belonging to the requestor which
//						could be registered.
//
//	Returns:  		Integer
//	 The column count.
//	-1 if an error is encountered.
//
//	Description:
//	 Determines all columns belonging to the requestor which could be registered.
//
//		*Note:	Function is only valid when serving a DataWindow control.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_colcount, li_i
integer		li_count
string		ls_coltype
string		ls_colname
string		ls_editstyle
string		ls_allcolumns[]

// Initialize.
as_allcolumns = ls_allcolumns

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

// Get the number of columns in the datawindow object
li_colcount = integer(idw_requestor.object.datawindow.Column.Count)

// Loop around all columns looking for Date columns.
For li_i=1 to li_colcount
	ls_coltype = idw_requestor.Describe("#"+string(li_i)+".coltype")
	ls_editstyle = idw_requestor.Describe ("#"+string(li_i)+".Edit.Style")

	If ls_editstyle = 'ddlb' or ls_editstyle='edit' or ls_editstyle='editmask' Then
		If of_IsDateType(ls_coltype) Then	
			ls_colname = idw_requestor.Describe("#"+string(li_i)+".Name")

			// Add entry into array.
			li_count = upperbound(ls_allcolumns) +1
			ls_allcolumns[li_count] = ls_colname		
		End If
	End If
	
Next

as_allcolumns = ls_allcolumns
Return UpperBound(as_allcolumns)

end function

     
Name Owner
pfc_u_tabpg_dwproperty_srvcalendar.pfc_propertypopulate pfc_u_tabpg_dwproperty_srvcalendar

     
Name Owner
datawindow.describe datawindow
systemfunctions.integer systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.string systemfunctions
systemfunctions.upperbound systemfunctions
pfc_u_calendar.of_isdatetype pfc_u_calendar

     
Full name
No Data

     
Name Scope
No Data