of_getparent


pfcmain.pbl   >   pfc_n_ds   >   of_getparent   

Full name pfc_n_ds.of_getparent
Access public
Extend of integer
Return value integer
Prototype public function integer of_getparent(ref powerobject)

Name Datatype
No Data

Name Datatype
lpo_notvalid powerobject

public function integer of_getparent (ref powerobject apo_parent);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_GetParentWindow
//
//	Access:  public
//
//	Arguments:
//	apo_parent (by ref) The Parent for this Dynamically created object.
//
//	Returns:  integer
//	 1 = success
//	-1 = error
//
//	Description:	Gets the Parent  for this Dynamically created object.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

powerobject lpo_notvalid

// Check if the parentwindow reference is still valid.
If IsValid(ipo_parent) Then
	// Return the parent window.
	apo_parent = ipo_parent
	Return 1
End If

// There is no valid parent to return.
If IsValid(gnv_app.inv_debug) Then				
	of_MessageBox ("pfc_getparent_debug", "PowerBuilder Class Library", &
		"For certain functionality the " + &
		"PFC DataStore requires a reference to its parent object. " + &
		"One of these cases has been encountered.  To let the Datastore "+&
		"know who its parent window call the of_SetParent(...) "+&
		"function after the DataStore creation.", &
		Exclamation!, Ok!, 1)
End If

apo_parent = lpo_notvalid
Return -1
end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isvalid systemfunctions
pfc_n_ds.of_messagebox pfc_n_ds

     
Full name
demopfc

     
Name Scope
No Data