*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (ES) AUTOGENERADO - ˇˇATENCIÓN!! - ˇˇNO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!!
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.19" SourceFile="classlib_method_order_bug_test.vcx" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS grdbase AS grid 
 	*< CLASSDATA: Baseclass="grid" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column2.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: canresort
		*m: commoncolumnclick		&& Generic column click handler
		*m: createtag		&& Create a grid indexd tag for sorting
		*m: resizecover
		*m: visible_assign
	*</DefinedPropArrayMethod>

	ColumnCount = 2
	Height = 200
	Name = "grdbase"
	Width = 320
	Column1.Name = "Column1"
	Column2.Name = "Column2"

	ADD OBJECT 'Column1.Header1' AS header WITH ;
		Caption = "Header1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Column2.Header1' AS header WITH ;
		Caption = "Header1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE canresort
		*
		* CanResort
		*
		RETURN .T.
	ENDPROC

	PROCEDURE Click
		*
		* Do some things here
		*
		DODEFAULT()
	ENDPROC

	PROCEDURE commoncolumnclick		&& Generic column click handler
		*
		* Common behavior when clicked
		*
		LPARAMETERS toColumn
	ENDPROC

	PROCEDURE createtag		&& Create a grid indexd tag for sorting
		*
		* Index on each column's ControlSource
		*
	ENDPROC

	PROCEDURE DblClick
		*
		* Double-clicked!
		*
		RETURN DODEFAULT()
	ENDPROC

	PROCEDURE Destroy
		*
		* Destroy the grid
		*
		RETURN .T.
	ENDPROC

	PROCEDURE Resize
		*
		* React to resizing the grid
		*
	ENDPROC

	PROCEDURE resizecover
		*
		* ResizeCover if one exists
		*
	ENDPROC

	PROCEDURE visible_assign
		LPARAMETERS vNewVal
		*To do: Modify this routine for the Assign method
		THIS.Visible = m.vNewVal
		
	ENDPROC

	PROCEDURE When
		*
		* When what?
		*
	ENDPROC

	PROCEDURE Column1.Text1.Click
		*
		* Call common method
		*
		this.Parent.Parent.commoncolumnclick(this)
	ENDPROC

	PROCEDURE Column2.Text1.Click
		*
		* Call common method
		*
		this.Parent.Parent.commoncolumnclick(this)
	ENDPROC

ENDDEFINE

DEFINE CLASS grdgeneral AS grdbase OF "classlib.vcx" 
 	*< CLASSDATA: Baseclass="grid" Timestamp="" Scale="Pixels" Uniqueid="" />

	Name = "grdgeneral"
	Column1.Header1.Name = "Header1"
	Column1.Name = "Column1"
	Column1.Text1.Name = "Text1"
	Column2.Header1.Name = "Header1"
	Column2.Name = "Column2"
	Column2.Text1.Name = "Text1"
	
	PROCEDURE canresort
		*
		* Call default logic.
		*
		IF NOT DODEFAULT()
			RETURN .F.
		ENDIF
	ENDPROC

	PROCEDURE commoncolumnclick		&& Generic column click handler
		*!******************************************************************************
		*!*        Method: grdGeneral::CommonColumnClick()
		*!*       Returns: Logical
		LPARAMETERS toColumn
		
		*
		* Call default logic.
		*
		IF NOT DODEFAULT()
			RETURN .F.
		ENDIF
		
		*
		* Measure Success
		*
		LOCAL llSuccess as Boolean
		llSuccess = .T.
		
		** TODO
		
		*
		* Return logical, success(T) or failure(F)
		*
		RETURN llSuccess
	ENDPROC

	PROCEDURE Init
		*
		* Call default logic.
		*
		IF NOT DODEFAULT()
			RETURN .F.
		ENDIF
	ENDPROC

	PROCEDURE Column1.Text1.Click
		*
		* Call default logic.
		*
		IF NOT DODEFAULT()
			RETURN .F.
		ENDIF
	ENDPROC

ENDDEFINE
