Amigos del foro, tengo este programa cuya funcion EXPED1 la llamo desde el programa principal, el asunto es que el compilador no me genera el archivo ficha.c si despues de definir el dialogo tengo REDEFINES GET.........etc., si hago la definicion del dialogo y el ACTIVATE DIALOGO carga el recurso ok, solo es que comienze con los REDEFINES GET y COMBOBOX ya me da error en la compilacion y me dice que el archivo ficha.c no existe, y es que realmente no se genera y aun no se porque ..............
alguna ayuda de que estare haciendo mal ?
// el programa se llama Ficha.prg
#Include "FiveWin.ch"
#Include "Image.ch"
#Include "Report.ch"
//======================
FUNCTION EXPED1()
//======================
Local oDlg,oBrush,oFont1
Local oLbx
LoadLibrary("BWCC32.DLL")
USE "MAESTRO" NEW SHARED ALIAS MAE11 VIA "SQLRDD"
SELECT MAE11
DEFINE DIALOG oDlg RESOURCE 4
REDEFINE LISTBOX oLbx FIELDS MAE11->NUM_INSS,DTOC(MAE11->FEC_INGRESO), MAE11->CEDULA, ;
ALLTRIM(MAE11->NOMBRES), ALLTRIM(MAE11->APELLIDO1), ALLTRIM(MAE11->APELLIDO2), MAE11->TRABAJO, ;
MAE11->TEL_TRABAJO, MAE11->STATUS ;
HEADERS "# del INSS ","Fec_Ing","# de Cedula ", " Nombres " ,;
"Apellido 1" ,"Apellido 2","Centro de Trabajo ","Tel. Trabajo","Status " ;
FIELDSIZES 100,100,150,200,150,150,250,150,150 ;
ON LEFT DBLCLICK EMAE2( oLbx, .F.);
ID 101 OF oDlg
oLbx:bRClicked = { || oLbx:ShowSizes() }
oLbx:aJustify := {.F.,.F.,.F.,.F.,.F.,.F.,.F.,.F.,.F.}
oLbx:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(230,230,230),RGB(190,215,190))}
REDEFINE BUTTON ID 102 of oDlg ACTION EMAE2( oLbx, .T. )
REDEFINE BUTTON ID 103 of oDlg ACTION EMAE2( oLbx, .F. )
REDEFINE BUTTON ID 104 of oDlg ACTION BMAE2( oLbx )
REDEFINE BUTTON ID 106 of oDlg ACTION BUSMAE2( oLbx )
REDEFINE BUTTON ID 105 of oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg
CLOSE DATA
Return nil
//=======================================
STATIC FUNCTION EMAE2( oLbx, SiNuevo )
//=======================================
Local oDlg, oDbf, lSave := .f.,oBitmap1,oBrush,oFont1
Local aSexo,aStatus,aDepto[1],aMuni,aPrograma,aEstado
Local mInss,mIng,mCed,mProg,mNom,map1,map2,msexo,mcivil,mnac,mano,mmes1,mdia1,mdir1,mdep,mmuni,mbarrio,mtel,mcel
Local mTrab,mtelt,mNumpat,mContra,mVence,mrrhh,mdirt,mpapa,medadp,mmama,medadm,mstatus
Local oGet[40]
aSexo = {"1.-Masculino","2.-Femenino"}
aEstado = {"1.-Soltero(a)","2.-Casado(a)","3.-Acompañado(a)","4.-Divorciado(a)","5.-Viudo(a)"}
aStatus = {"1.-Derecho Activo","2.-Fuera de Cobertura","3.-Caso Especial","4.-Privado"}
aPrograma = {"1.-Privados","2.-Previsional","3.-Eventuales ","4.-Riesgo profesional","5.-Adulto Mayor"}
USE "DEPARTAMENTOS" NEW SHARED ALIAS DEP11 VIA "SQLRDD"
aDepto[1] = DEP11->COD_DEP+"-"+ALLTRIM(DEP11->NOMBRE)
SKIP
DO WHILE .NOT. EOF()
AADD(aDepto, DEP11->COD_DEP+"-"+ALLTRIM(DEP11->NOMBRE))
SKIP
ENDDO
CLOSE DEP11
DEFAULT SiNuevo:=.F.
SELECT MAE11
If Sinuevo
mInss := SPACE(12)
mIng := CTOD("")
mCed := SPACE(16)
mProg := SPACE(40)
mNom := SPACE(30)
map1 := SPACE(15)
map2 := SPACE(15)
msexo := SPACE(12)
mcivil := SPACE(15)
mnac := CTOD("")
mano := 0
mmes1 := 0
mdia1 := 0
mdir1 := SPACE(60)
mdep := SPACE(15)
mmuni := SPACE(25)
mbarrio := SPACE(35)
mtel := SPACE(20)
mcel := SPACE(12)
mTrab := SPACE(40)
mtelt := SPACE(15)
mNumpat := SPACE(12)
mContra := SPACE(1)
mVence := CTOD("")
mrrhh := SPACE(40)
mdirt := SPACE(60)
mpapa := SPACE(40)
medadp := 0
mmama := SPACE(40)
medadm := 0
mstatus := SPACE(30)
else
mInss := MAE11->NUM_INSS
mIng := MAE11->FEC_INGRESO
mCed := MAE11->CEDULA
mProg := MAE11->PROGRAMA
mNom := MAE11->NOMBRES
map1 := MAE11->APELLIDO1
map2 := MAE11->APELLIDO2
msexo := MAE11->_
mcivil := MAE11->ESTADO_CIVIL
mnac := MAE11->FEC_NAC
mano := MAE11->ANOS
mmes1 := MAE11->MESES
mdia1 := MAE11->DIAS
mdir1 := MAE11->DIRECCION_CASA
mdep := MAE11->DEPARTAMENTO
mmuni := MAE11->MUNICIPIO
mbarrio := MAE11->BARRIO
mtel := MAE11->TEL_CASA
mcel := MAE11->CELULAR
mTrab := MAE11->TRABAJO
mtelt := MAE11->TEL_TRABAJO
mNumpat := MAE11->NUM_PAT
mContra := MAE11->CONTRATO
mVence := MAE11->FEC_VENCE
mrrhh := MAE11->RESP_RRHH
mdirt := MAE11->DIREC_TRABAJO
mpapa := MAE11->NOM_PADRE
medadp := MAE11->EDAD_PADRE
mmama := MAE11->NOM_MADRE
medadm := MAE11->EDAD_MADRE
mstatus := MAE11->STATUS
ENDIF
DEFINE BRUSH oBrush FILENAME "Iron2.bmp"
DEFINE DIALOG oDlg RESOURCE 99 //BRUSH oBrush TRANSPARENT
// REDEFINE GET oGet[1] Var mInss ID 104 of oDlg VALID(EXISTE1(@MAE11->NUM_INSS,@oGet[1])) WHEN Sinuevo
msgalert("aqui activo el dialogo deberia verse el recurso ")
REDEFINE BUTTON ID 102 OF oDlg ACTION ( lSave := .T. , oDlg:End() )
REDEFINE BUTTON ID 103 OF oDlg ACTION ( lSave := .F. , oDlg:End()) CANCEL
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
el bat de compilacion que uso es :
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 9.04 - Apr. 2009 xHarbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2009 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
if "%FWDIR%" == "" set FWDIR=c:\fwh904
if "%XHDIR%" == "" set XHDIR=c:\xhb904
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\borland\bcc55
set fwh=%FWDIR%
%hdir%\bin\harbour %1 ficha reportes /n /i%fwh%\include;%hdir%\include /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log
echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c ficha.c reportes.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r %1
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj + >> b32.bc
echo ficha.obj + >> b32.bc
echo reportes.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib + >> b32.bc
echo %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\gtgui.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\libmysql.lib + >> b32.bc
echo %hdirl%\libpq.lib + >> b32.bc
echo %hdirl%\mysql.lib + >> b32.bc
echo %hdirl%\mysqlmt.lib + >> b32.bc
echo %hdirl%\sql.lib + >> b32.bc
echo %hdirl%\sqlmt.lib + >> b32.bc
echo %hdirl%\oci.lib + >> b32.bc
echo %hdirl%\odbccp32.lib + >> b32.bc
echo %hdirl%\fbclient_bc.lib + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\uuid.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc
IF EXIST %1.res echo %1.res >> b32.bc
rem uncomment this line to use the debugger and comment the following one
rem if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
rem IF ERRORLEVEL 1 GOTO LINKERROR
rem if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
%bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT
:LINKERROR
ECHO * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
Saludos y de antemano gracias por su generosa ayuda, FWH904 + BORLAND BCC55 + WORKSHOP + XHARBOUR
Ramon Paredes
Managua, Nicaragua