of_getparentwindow


pfcmain.pbl   >   pfc_u_base   >   of_getparentwindow   

Full name pfc_u_base.of_getparentwindow
Access public
Extend of integer
Return value integer
Prototype public function integer of_getparentwindow(ref window)

Name Datatype
No Data

Name Datatype
lpo_parent powerobject

public function integer of_getparentwindow (ref window aw_parent);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_GetParentWindow
//
//	Access:  		public
//
//	Arguments:
//	aw_parent		The Parent window for this object (passed by reference).
//						If a parent window is not found, variable returns
//						with NULL.
//
//	Returns:  		Integer
//						1 if it succeeds and -1 if an error occurs.
//
//	Description:	Calculates the parent window of a window object.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996 Powersoft Corporation.  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_parent

//Loop getting the parent of the object until it is of type window!
lpo_parent = this.GetParent()
do while IsValid (lpo_parent)
	If lpo_parent.TypeOf() = window! Then Exit
	lpo_parent = lpo_parent.GetParent()
loop

if not IsValid (lpo_parent) then
	setnull(aw_parent)	
	return -1
end If

aw_parent = lpo_parent
return 1

end function

     
Name Owner
u_proftab.constructor u_proftab
u_persotab.constructor u_persotab

     
Name Owner
powerobject.getparent powerobject
powerobject.typeof powerobject
systemfunctions.isvalid systemfunctions
systemfunctions.setnull systemfunctions

     
Full name
No Data

     
Name Scope
No Data