//////////////////////////////////////////////////////// // Object : // Method : of_IsValid - Definition - DataObject () // Author : Réal Gagnon (http://www.RGagnon.com) // Compiled by: PowerObject! [Shekar Reddy] // Date : 1/24/2003 //////////////////////////////////////////////////////// // Arg : string as_Obj // Return : boolean //////////////////////////////////////////////////////// // Desc : Validate the definition/existence of a Window, // UserObject or a Datawindow in the current // Library-list // Usage : of_IsValidDefinition( "w_sheet" ) // of_IsValidDefinition( "u_dw" ) // of_IsValidDataObject( "d_report" )... //////////////////////////////////////////////////////// //////////////////////////////////////////////////////// FUNCTION boolean of_IsValidDefinition( string as_Obj ) //////////////////////////////////////////////////////// // Checks if a Window or UserObject definition exists //////////////////////////////////////////////////////// classDefinition lcd_Obj ; // lcd_Obj = FindClassDefinition( as_Obj ) ; // IF IsNull( lcd_Obj ) THEN //MessageBox("Error", as_Obj + " does not exist " + & // "in the current Library-list!" ) ; RETURN FALSE ; END IF ; // RETURN TRUE ; //////////////////////////////////////////////////////// FUNCTION boolean of_IsValidDataObject( string as_Obj ) //////////////////////////////////////////////////////// // Checks if a DataWindow definition exists //////////////////////////////////////////////////////// dataStore lds_Obj ; // lds_Obj = CREATE datastore lds_Obj.DataObject = as_Obj ; // IF NOT IsValid( lds_Obj.Object ) THEN //MessageBox( "Error", "The datawindow " + as_Obj + " does not exist " + & // "in the current Library-list!" ) ; DESTROY lds_Obj ; RETURN FALSE ; END IF ; // DESTROY lds_Obj ; // RETURN TRUE ; ////////////////////////////////////////////////////////