Han-Get First Object by criteria

From Vectorlab
Jump to: navigation, search


Gets first object according to criteria. By Orso B. Schmid


{ Orso **************************************** }
{ gets first obj according to criteria }
FUNCTION H_GetCriteriaFirstObj(criteria: STRING): HANDLE;
	VAR
		temp_h : HANDLE;
	
	PROCEDURE CriteriaObj(h : HANDLE);
		BEGIN
			IF temp_h = NIL THEN
				temp_h := h;
		END;
	
	BEGIN
		temp_h := NIL;
		ForEachObject(CriteriaObj, criteria);
		H_GetCriteriaFirstObj := temp_h;
	END;