FoxPro/Visual FoxPro - Crear clases mediante programacion

 
Vista:

Crear clases mediante programacion

Publicado por sergio (737 intervenciones) el 20/10/2006 20:39:38
tengo el siguiente codigo y no se donde van el procedimiento procedure boton.click para que puedan ser ejecutadas, si las pango dentro de la clase me dice miembro desconocido, si las pongo fuera de la clase no las lee, alguien podria decirme como programar el click del objeto boton

procedure boton.click
export to c:\sergio\planilla type xls
thisform.release
endproc

CLEAR ALL
CLEAR
PUBLIC oForm
oForm=CREATEOBJECT("MyForm",ADDBS(GETDIR("c:\sergio")),"*.*",.f.)

DEFINE CLASS MyForm as Form

AllowOutput=.f. && so '?' output goes to screen
Width=_screen.Width
Height=_screen.Height-50
Width=800
Height=600

PROCEDURE init
lparameters cPath , cMask , fSubDir

SET EXCLUSIVE OFF
SET SAFETY OFF
SET TALK off
SET EXACT OFF

CREATE table Files (path c(240),fname c(240),fsize n(10,0),timestamp t)

this.DoDir(cPath,cMask)

INDEX on timestamp DESCENDING TAG t && choose your desired order

this.AddObject("grilla","grid")
this.addobject("boton","commandbutton")

this.grilla.Visible=1
this.grilla.top = 30
this.grilla.Width = thisform.width

this.grilla.Height=thisform.height

this.grilla.Column3.InputMask="999,999,999"

this.Show

this.boton.visible = .t.
this.boton.top = 0
this.boton.left = 0

PROCEDURE DoDir
lparameters cPath, cMask

LOCAL n,i,listado[1]

nCantidad=ADIR(listado,cPath+cMask,"",1)

FOR i = 1 TO nCantidad
INSERT INTO files (Path,fname,fsize,timestamp) VALUES (cPath, listado[i,1], listado[i,2],CTOT(DTOC(listado[i,3])+listado[i,4]))
ENDFOR

ENDDEFINE
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:Crear clases mediante programacion

Publicado por Ernesto Hernandez (4623 intervenciones) el 21/10/2006 00:44:47
y por que no crear tu clase en ambiente grafico no crees que esa manera la podrias volver a utilizar

Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar