Amigos del foro, tengo el siguiente codigo :
Do While .T.
Select H
zap
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
store 0 to mTotalReg,mTotaligv,mTotalcos
mCancelar := .F.
Select H
DEFINE DIALOG oDlg RESOURCE 143 BRUSH oBrush TRANSPARENT FONT oFont1
REDEFINE INFOBAR oInfoBar ID 100 GRADIENT;
BITMAP "Notes.BMP" LEFT PROMPT "Registro de Cosumo de Telas " CENTER ;
COLOR CLR_WHITE TEXT "" LEFT COLOR CLR_YELLOW ;
OF oDlg UPDATE BORDER
REDEFINE GET oNumero VAR mNumero ID 121 OF oDlg VALID(BUS_CON2(@mnumero,@oNumero))
REDEFINE GET oCod Var mCod ID 101 of oDlg VALID(BUS_GRUPO(@mCod,@oCod,@mDesc1,@oDesc1))
REDEFINE GET oDesc1 Var mDesc1 ID 103 of oDlg WHEN .F.
REDEFINE GET oFecha Var mFecha ID 109 of oDlg PICTURE "99/99/9999"
REDEFINE GET mMts Var mMts ID 116 of oDlg PICTURE "999.99"
REDEFINE GET oConcep1 Var mConcep1 ID 114 of oDlg when mEditar
REDEFINE GET oConcep2 Var mConcep2 ID 115 of oDlg when mEditar
REDEFINE LISTBOX oBrw FIELDS H->PROF, ALLTRIM(H->NOM_CLI),TRANSFORM(H->PLAN_MT,"999.99"),TRANSFORM(H->REAL_MT,"999.99") ;
HEADERS "Proforma","Cliente al Que pertenece ","Plan Mts", "Real Mts" ;
FIELDSIZES 80,250,100,100 ;
ID 102 OF oDlg
oBrw:nClrForeFocus:= {|| CLR_YELLOW }
oBrw:nClrBackFocus:= {|| CLR_GREEN }
oBrw:bRClicked = { || oLbx:ShowSizes() }
oBrw:aJustify := {.F.,.F.,.F.,.F.}
oBrw:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(230,230,230),RGB(190,215,190))}
REDEFINE GET oTotalReg Var mTotalReg ID 119 of oDlg picture "999,999.99" when .F.
REDEFINE GET oTotaligv Var mTotaligv ID 120 of oDlg picture "999,999.99" when .F.
REDEFINE GET oTotalcos Var mTotalcos ID 104 of oDlg picture "999,999.99" when .F.
REDEFINE BUTTON ID 133 OF oDlg ;
ACTION ( mGrabar:=.T.,mBorrar:=.F.,GrabaSal2() ) WHEN mEDITAR
REDEFINE BUTTON ID 107 OF oDlg ACTION( mCancelar:=.T., oDlg:End())
REDEFINE BUTTON oBtagre ID 110 OF oDlg ACTION ( ModiSal2(.T.) ) WHEN mEDITAR
REDEFINE BUTTON oBtmodi ID 112 OF oDlg ACTION ( ModiSal2(.F.) ) When mEditar
REDEFINE BUTTON oBtborra ID 132 OF oDlg ACTION ( BorraS1() ) when mEditar
ACTIVATE DIALOG oDlg CENTERED
If mCancelar
Exit
Endif
ENDDO
CLOSE DATA
oFont1:End()
oBrush:End()
Return Nil
El asunto es que el codigo compila perfectamente pero cuando lo ejecuto en el menu de la aplicacion me envia un error un tanto extraño, ni idea tengo a que se deba, me direcciona a la linea tget.prg (1743) que ni existe, el error es el siguiente :
==========
Path and name: C:\sistemas\MONGALO2\MONGALO.exe (32 bits)
Size: 3,194,880 bytes
Time from start: 0 hours 0 mins 6 secs
Error occurred at: 03/10/2009, 12:23:26
Error description: Error BASE/1122 Argument error: TRANSFORM
Args:
[ 1] = O Object
[ 2] = C 999.99
Stack Calls
===========
Called from: => TRANSFORM(0)
Called from: tget.prg => TCLIPGET:PUTMASK(1743)
Called from: tget.prg => TCLIPGET:SETFOCUS(806)
Called from: TGET.PRG => TGET:INITIATE(0)
Called from: => __OBJSENDMSG(0)
Called from: HARBOUR.PRG => OSEND(0)
Called from: HARBOUR.PRG => ASEND(0)
Called from: DIALOG.PRG => TDIALOG:INITIATE(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: fisico.prg => FISICO3(136)
Called from: mongalo.prg => (b)BUILDMENU(232)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: mongalo.prg => MAIN(145)
System
======
CPU type: Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz 1733 Mhz
Hardware memory: 1015 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Compiler version: xHarbour build 1.1.0 Intl. (SimpLex)
Windows version: 5.1, Build 2600 Service Pack 3
Windows total applications running: 55
1
2 SysFader
3 M
4 Default IME
5 Menú Inicio
6 CiceroUIWndFrame
7 TF_FloatingLangBar_WndTitle
8 S/PDIF IN/OUT Settings
9 Set Device Type
10 Mixer ToolBox
11 Connector Settings
12 CL RC Engine3 Dummy Winidow
13 SISTEMA INTEGRADO DE CONTROLES ADMINISTRATIVOS - Mongalo Publicidad
14 Símbolo del sistema
15 HideForm
16 Mongalo
17 http://www.FiveTechSoft.com • Post a new topic - Windows Internet Explorer
18 MED - unregistered - [C:\sistemas\MONGALO2\fisico.prg]
19 MCI command handling window
20 Acrobat IEHelper
21 DDE Server Window
22 WOWExec
23 AD760EEA-46D4-4e12-BAF5-58E2E3D1D0B2_rparedes88@hotmail.com
24 B1E4D14A-F6D0-457d-8F12-711BF924E011_rparedes88@hotmail.com
25 D897EE71-E263-449d-9241-5E918A81AF41_rparedes88@hotmail.com
26 0C6C1D2B-CA92-49a1-B5F5-A9BBF3D2921A_rparedes88@hotmail.com
27 CTicketManagerWnd
28 RTCMediaMessageWindow
29 CRTCMediaController
30 CRTCClient
31 TaskSwitchXP Pro 2.0
32 DTS Connect
33 Dolby Home Threater
34 Advance Setting
35 TOOLBOX
36 Load EQ Preset
37 DeleteEQ
38 Save EQ
39 Realtek HD Audio Manager
40 BackMain_Form
41 Notification Wnd for RNAdmin
42 Connections Tray
43 avast! UI Control Window
44 avast! Antivirus
45 Medidor de energía
46 HkWndName
47 PersistWndName
48 igfxtrayWindow
49 MS_WebcheckMonitor
50 aswServ helper window
51 GDI+ Window
52 Mi PC
53 Windows Live Messenger
54 Resource Workshop - DIALOG : DIALOG_137
55 Program Manager
Variables in use
================
Procedure Type Value
==========================
TRANSFORM
Param 1: O Class: TGET
Param 2: C "999.99"
Local 1: U
Local 2: N 0
TCLIPGET:PUTMASK
Param 1: O Class: TGET
Param 2: L .F.
Local 1: O Class: TCLIPGET
Local 2: U
Local 3: U
Local 4: C ""
Local 5: C "999.99"
Local 6: U
Local 7: U
Local 8: U
Local 9: N 0
TCLIPGET:SETFOCUS
Local 1: O Class: TCLIPGET
Local 2: O Class: TGET
Local 3: U
Local 4: O Class: TCLIPGET
TGET:INITIATE
Param 1: N 1377674
Local 1: O Class: TGET
__OBJSENDMSG
Param 1: O Class: TGET
Param 2: C "INITIATE"
Param 3: N 1377674
OSEND
Param 1: O Class: TGET
Param 2: C "INITIATE"
Param 3: N 1377674
Local 1: U
Local 2: U
Local 3: U
Local 4: U
Local 5: U
Local 6: U
Local 7: U
Local 8: U
Local 9: U
Local 10: N 1
Local 11: U
ASEND
Param 1: A Len: 17
Param 2: C "INITIATE()"
Param 3: N 1377674
Local 1: U
Local 2: U
Local 3: U
Local 4: U
Local 5: U
Local 6: U
Local 7: U
Local 8: U
Local 9: U
Local 10: N 6
Local 11: N 1
TDIALOG:INITIATE
Param 1: N 1771018
Param 2: N 1377674
Local 1: O Class: TDIALOG
Local 2: L .T.
Local 3: U
Local 4: U
Local 5: L .F.
Local 6: U
TDIALOG:HANDLEEVENT
Param 1: N 272
Param 2: N 1771018
Param 3: N 1377674
Local 1: O Class: TDIALOG
DIALOGBOX
Param 1: N 4194304
Param 2: N 143
Param 3: N 132642
Param 4: O Class: TDIALOG
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: L .F.
Local 1: O Class: TDIALOG
Local 2: N 132642
Local 3: U
Local 4: U
Local 5: U
Local 6: O Class: TDIALOG
FISICO3
Local 1: O Class: TDIALOG
Local 2: O Class: TBRUSH
Local 3: O Class: TVIAINFOBAR
Local 4: O Class: TFONT
Local 5: A Len: 16
(b)BUILDMENU
Param 1: O Class: TMENUITEM
TMENU:COMMAND
Param 1: N 20052
Local 1: O Class: TMENU
Local 2: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20052
Param 2: N 0
Local 1: O Class: TWINDOW
Local 2: N 0
Local 3: N 20052
Local 4: N 0
TWINDOW:HANDLEEVENT
Param 1: N 273
Param 2: N 20052
Param 3: N 0
_FWH
Param 1: N 0
Param 2: N 273
Param 3: N 20052
Param 4: N 0
Param 5: N 1
Local 1: O Class: TWINDOW
WINRUN
Param 1: N 132642
TWINDOW:ACTIVATE
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: U
Param 18: U
Param 19: U
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
MAIN
Local 1: O Class: TBAR
Local 2: U
Local 3: U
Local 4: O Class: TIMAGE
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
1: CONS_E RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> NUMERO CONS_E1
Relations in use
2: CONS_D RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> NUMERO CONS_D1
Relations in use
3: GRUPOS RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 534 .F. .F.
Indexes in use TagName
=> CODIGO GRUPOS1
DESC1 GRUPOS2
UPPER(DESC1) GRUPOS3
Relations in use
4: F2A RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
3923 8839 .F. .F.
Indexes in use TagName
=> TIPO_DOC + NUMFACT F2A1
NUM_OI F2A2
NUM_FAC F2A3
MAQUINA F2A6
NUMFACT + SUBSTR(CODPROD,1,3) F2ACONS
Relations in use
8: => MOV_CONS RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
Relations in use
Classes in use:
===============
1 HASHENTRY
2 HBCLASS
3 HBOBJECT
4 FRREPORTMANAGER
5 FRPRINTOPTIONS
6 FRPREVIEWOPTIONS
7 FRENGINEOPTIONS
8 FRREPORTOPTIONS
9 TWINDOW
10 TDIALOG
11 TBRUSH
12 TCONTROL
13 TGET
14 GET
15 TCLIPGET
16 TBITMAP
17 TBUTTON
18 TFONT
19 TMENU
20 TMENUITEM
21 TBAR
22 TRECT
23 TBTNBMP
24 TMSGBAR
25 TMSGITEM
26 TTIMER
27 TIMAGE
28 TVIAINFOBAR
29 TVIABITMAP
30 TWBROWSE
31 ERROR
32 TREG32
Memory Analysis
===============
1947 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes
De antemano muy agradecido de cualquier orientacion al respecto, que estoy por tirar la toalla,
Saludes desde Managua, Nicaragua
Ramon Paredes
UN ERROR RARO (SOLUCIONADO)
- Ramon Paredes
- Posts: 215
- Joined: Fri Feb 02, 2007 3:38 pm
- Location: Managua, Nicaragua
UN ERROR RARO (SOLUCIONADO)
Last edited by Ramon Paredes on Sat Oct 03, 2009 8:57 pm, edited 1 time in total.
... Desde la Tierra de lagos y Volcanes......
Re: UN ERROR RARO
La verdad hay algunas cosas que no entiendo en el codigo que pusiste, ej. por que tienes todo el ingreso dentro de un ciclo while y cada ves que haces el ingreso de los datos borras la tabla "H", te aconsejo empezar por REDEFIR los GEt fuera del while ya que por cada ciclo del while vuelves as REDEFINERLOs...
Ojala lo soluciones...
Ojala lo soluciones...
- Ramon Paredes
- Posts: 215
- Joined: Fri Feb 02, 2007 3:38 pm
- Location: Managua, Nicaragua
Re: UN ERROR RARO
vpozo :
Gracias por contestar, el codigo es asi, es parte de un programa que usa encabezado - detalle y funcionan con esa logica , el post es mas bien por el error que me da un error en transform que nada tiene que ver con la definicion que tengo, y la pila de llamadas que me presenta que nada que ver con el codigo, este sistema esta hecho con fwh 8.02 y funciona desde hace un año, ahora que hice esa nueva captura es que me sale ese extraño error
Saludes desde Managua, Nicaragua, el codigo completo de esa nueva pantalla es el siguiente :
#include "FiveWin.ch"
#include "colors.ch"
#include "ord.ch"
#include "noway.ch"
#include "Report.ch"
Static mGrabar,mBorrar, mAnular, mNvoDoc,mTotalcos,mTotaligv,mTotalReg,mNomcli,oNomcli
static mNumero,mCod,mDesc1,mFecha,mMts,mObser1,mObser2,oNumero,oCod,oDesc1,oFecha,oMts,oObser1,oObser2
static oProf,mProf,oCli,mCli,mMedProf,mConsumo,oMedProf,oConsumo,FilMovi, FilNtx, oSay1,oBrw,oBtagre,oBtborra,oBtmodi
Static mEditar, mSiNuevo, mAceptar, mCancelar, oDlg2, wcan,SiNuevo, oAceptar, oCancelar, oSalir
//====================
FUNCTION FISICO3()
//====================
Local oDlg,oBrush,oInfobar
Local oFont1,aStruct
LoadLibrary("Bwcc32.dll")
DBCLOSEALL()
SYSREFRESH()
SELECT A
If Dlk_Abre("CONS_E",.F.) = .F.
close data
quit
Endif
SET INDEX TO CONS_E
Go Top
SELECT B
If Dlk_Abre("CONS_D",.F.) = .F.
close data
quit
Endif
SET INDEX TO CONS_D
Go Top
WCAN := FCOUNT()
PUBLIC CAMPO[WCAN]
aStruct := DbStruct()
FilMovi := "C:\"+ALLTRIM(PUSUARIO)+"\DATA1\MOV_CONS.dbf"
Erase (FilMovi)
DbCreate(FilMovi, aStruct)
SELECT C
If Dlk_Abre("GRUPOS",.F.) = .F.
close data
quit
Endif
Set Index to GRUPOS
Go Top
SELECT D
If Dlk_Abre("F2A",.F.) = .F.
close data
quit
Endif
Set Index to F2A
Go Top
SELECT H
IF DLk_Abre(FILMOVI,.T.) = .F.
Close Data
Quit
Endif
Store .F. To mEditar,mSiNuevo,mAceptar,mCancelar
DEFINE FONT oFont1 NAME "Tahoma" SIZE 0,-9 BOLD
DEFINE BRUSH oBrush FILENAME "Iron2.bmp"
Do While .T.
Select H
zap
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
store 0 to mTotalReg,mTotaligv,mTotalcos
mCancelar := .F.
Select H
DEFINE DIALOG oDlg RESOURCE 143 BRUSH oBrush TRANSPARENT FONT oFont1
REDEFINE INFOBAR oInfoBar ID 100 GRADIENT;
BITMAP "Notes.BMP" LEFT PROMPT "Registro de Cosumo de Telas " CENTER ;
COLOR CLR_WHITE TEXT "" LEFT COLOR CLR_YELLOW ;
OF oDlg UPDATE BORDER
REDEFINE GET oNumero VAR mNumero ID 121 OF oDlg VALID(BUS_CON2(@mnumero,@oNumero))
REDEFINE GET oCod Var mCod ID 101 of oDlg VALID(BUS_GRUPO(@mCod,@oCod,@mDesc1,@oDesc1))
REDEFINE GET oDesc1 Var mDesc1 ID 103 of oDlg WHEN .F.
REDEFINE GET oFecha Var mFecha ID 109 of oDlg PICTURE "99/99/9999"
REDEFINE GET mMts Var mMts ID 116 of oDlg PICTURE "999.99"
REDEFINE GET oConcep1 Var mConcep1 ID 114 of oDlg when mEditar
REDEFINE GET oConcep2 Var mConcep2 ID 115 of oDlg when mEditar
REDEFINE LISTBOX oBrw FIELDS H->PROF, ALLTRIM(H->NOM_CLI),TRANSFORM(H->PLAN_MT,"999.99"),TRANSFORM(H->REAL_MT,"999.99") ;
HEADERS "Proforma","Cliente al Que pertenece ","Plan Mts", "Real Mts" ;
FIELDSIZES 80,250,100,100 ;
ID 102 OF oDlg
oBrw:nClrForeFocus:= {|| CLR_YELLOW }
oBrw:nClrBackFocus:= {|| CLR_GREEN }
oBrw:bRClicked = { || oLbx:ShowSizes() }
oBrw:aJustify := {.F.,.F.,.F.,.F.}
oBrw:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(230,230,230),RGB(190,215,190))}
REDEFINE GET oTotalReg Var mTotalReg ID 119 of oDlg picture "999,999.99" when .F.
REDEFINE GET oTotaligv Var mTotaligv ID 120 of oDlg picture "999,999.99" when .F.
REDEFINE GET oTotalcos Var mTotalcos ID 104 of oDlg picture "999,999.99" when .F.
REDEFINE BUTTON ID 133 OF oDlg ;
ACTION ( mGrabar:=.T.,mBorrar:=.F.,GrabaSal2() ) WHEN mEDITAR
REDEFINE BUTTON ID 107 OF oDlg ACTION( mCancelar:=.T., oDlg:End())
REDEFINE BUTTON oBtagre ID 110 OF oDlg ACTION ( ModiSal2(.T.) ) WHEN mEDITAR
REDEFINE BUTTON oBtmodi ID 112 OF oDlg ACTION ( ModiSal2(.F.) ) When mEditar
REDEFINE BUTTON oBtborra ID 132 OF oDlg ACTION ( BorraS1() ) when mEditar
ACTIVATE DIALOG oDlg CENTERED
If mCancelar
Exit
Endif
ENDDO
CLOSE DATA
oFont1:End()
oBrush:End()
Return Nil
//=============================================
STATIC FUNCTION BUS_CON2(fNumfact,foNumfac)
//=============================================
local oRet
fNumFact := Rellena(fNumFact," ",7)
foNumFac:refresh()
SELECT A
a->(ordsetfocus(1))
if DbSeek( fNumFact )
IF A->ANULADA = .T.
MsgAlert("Lo siento el Documento Ha sido Anulado.....Verifique")
Return .F.
ELSE
oRet = .T.
mNvoDoc = .F.
mNumero := A->NUMERO
mCod := A->CODPROD
mDesc1 := A->DESC1
mFecha := A->FECHA
mMts := A->TOT_MTS
mConcep1 := A->OBSERVA1
mConcep2 := A->OBSERVA2
select A
endif
Else
mNvoDoc = .T.
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
Endif
oNumero:Refresh()
oCod:Refresh()
oDesc1:Refresh()
oFecha:Refresh()
oMts:Refresh()
oConcep1:Refresh()
oConcep2:Refresh()
Select H
Zap
mTotalcos := 0
mTotaligv := 0
mTotalReg := 0
set delete off
Select B
b->(ordsetfocus(1))
if DbSeek(fNumFact)
Do While Numero = fNumFact
Select B
If Deleted()
skip
loop
endif
For I = 1 To Wcan
Pasa = Field(I)
Campo = &Pasa
Next
mTotaligv := mTotaligv + Real_Mt
mTotalcos := mTotalcos + Plan_Mt
Select H
Append Blank
For I = 1 To Wcan
PASA = FIELD(I)
REPLACE &Pasa With Campo
Next
Select B
SKIP
Enddo
endif
Set Delete On
oRet := .T.
mEditar := .T.
Select H
go top
Refres1()
obrw:refresh()
Return oRet
//==========================
Static Function Refres1()
//==========================
oNumero:Refresh()
oCod:Refresh()
oDesc1:Refresh()
oFecha:Refresh()
oMts:Refresh()
oConcep1:Refresh()
oConcep2:Refresh()
oTotalcos:Refresh()
oTotaligv:Refresh()
oTotalReg:Refresh()
Return
//=================================
Static Function ModiSal2(SiNuevo)
//=================================
Local oDlg2,oBrush,oInfobar
Local Enllavar := .F.
Local mAceptar := .F.
IF SiNuevo
MPROF := SPACE(7)
MCLI := SPACE(4)
MNOMCLI := SPACE(40)
MMEDPROF := 0
MCONSUMO := 0
ELSE
MPROF := H->PROF
MCLI := H->COD_CLI
MNOMCLI := H->NOM_CLI
MMEDPROF := H->PLAN_MT
MCONSUMO := H->REAL_MT
mTotaligv := mTotalIgv - mCONSUMO
mTotalCos := mTotalCos - mMEDPROF
ENDIF
DEFINE BRUSH oBrush FILENAME "OSXBack.bmp"
DEFINE DIALOG oDlg2 RESOURCE 144 BRUSH oBrush TRANSPARENT
REDEFINE INFOBAR oInfoBar ID 100 GRADIENT;
BITMAP "WORKER.BMP" LEFT PROMPT "Registro de Consumos " CENTER ;
COLOR CLR_WHITE TEXT "" LEFT COLOR CLR_YELLOW ;
OF oDlg2 UPDATE BORDER
REDEFINE GET oProf VAR mProf Of oDlg2 ID 101 Valid( bus_prof1(@mProf,@mCli,@mNomcli,@mMedprof,@oProf,@oCli,@oNomCli,@oMedprof,@mCod))
REDEFINE GET oCli VAR mCli of oDlg2 ID 109 WHEN .F.
REDEFINE GET oNomCli VAR mNomCli of oDlg2 ID 102 WHEN .F.
REDEFINE GET oMedprof VAR mMedprof of oDlg2 ID 107 WHEN .F. PICTURE "999.99"
REDEFINE GET oConsumo Var mConsumo of oDlg2 ID 110 PICTURE "999.99"
REDEFINE BUTTONBMP ID 105 OF oDlg2 ;
ACTION( mAceptar:=.T. , oDlg2:End() ) BITMAP "garrow.bmp" PROMPT " Aceptar" TEXTRIGHT
REDEFINE BUTTONBMP ID 106 OF oDlg2 ;
ACTION( mAceptar:=.F. , oDlg2:End() ) BITMAP "delete0.bmp" PROMPT " Cancelar" TEXTRIGHT
ACTIVATE DIALOG oDlg2 CENTERED
Select H
mTotaligv := mTotaligv + mConsumo
mTotalCos := mTotalcos + mMedprof
mTotalReg := mMts - mTotalIgv
oTotalcos:Refresh()
oTotaligv:Refresh()
oTotalReg:Refresh()
If mAceptar
If SiNuevo
Select H
rlock()
Append Blank
Endif
H->NUMERO := MNUMERO
H->CODPROD := MCOD
H->DESC1 := MDESC1
H->FECHA := MFECHA
H->TOT_MTS := MMTS
H->PROF := MPROF
H->COD_CLI := MCLI
H->NOM_CLI := MNOMCLI
H->PLAN_MT := MMEDPROF
H->REAL_MT := MCONSUMO
H->FECMOV := DATE()
H->HORMOV := AMPM(TIME())
Endif
oBrw:Refresh()
oBtagre:setfocus()
oTotalCos:Refresh()
oTotalReg:Refresh()
oTotaligv:Refresh()
Return Nil
//========================
Static Function GrabaSal2
//========================
SELECT A
a->(ordsetfocus(1))
IF DbSeek(mNumero)
If Dlk_REG()
Enllavado := .T.
Endif
Else
If Dlk_APPEN()
Enllavado := .T.
Endif
Endif
If enllavado
A->NUMERO := mNumero
A->CODPROD := mCod
A->DESC1 := mDesc1
A->FECHA := mFecha
A->TOT_MTS := mMts
A->OBSERVA1 := mConcep1
A->OBSERVA2 := mConcep2
A->FECMOV := DATE()
A->HORMOV := AMPM(TIME())
Unlock
Else
Return
Endif
SELECT B
b->(ordsetfocus(1))
SET DELETE ON
IF DbSeek( MNumero )
DO WHILE B->NUMERO = MNumero
IF DLK_REG()
DELETE
UNLOCK
ENDIF
SKIP
ENDDO
SET DELETE OFF
ENDIF
Select H
pack
Go Top
Set Delete Off
Do While .Not. Eof()
Select H
For I = 1 to Wcan
Pasa = Field(I)
Campo = &Pasa
Next
Select B
If Dlk_Appen()
For I = 1 to Wcan
Pasa = Field(I)
Replace &Pasa With Campo
Next
Endif
Unlock
Select H
Skip
Enddo
Set Delete On
Select H
Zap
mEditar := .F.
mTotalCos := 0
mTotaligv := 0
mTotalReg := 0
Refres1()
oNumero:SetFocus()
//ENDIF
//impsal(mtipo,mnumero)
Limpia()
return
//======================================================
Static Function bus_grupo(fCod,foCod,fNom,foNom)
//======================================================
Select GRUPOS
GRUPOS->(OrdSetFocus(1))
If !DbSeek( fCod )
oRet := .F.
If MsgYesNo("Codigo de Producto No Existe en el Catalogo")
fCod = dBasist("CODPROD3")
If fCod # ""
oRet := .F.
Else
KEYBOARD CHR(13)
fCod := GRUPOS->CODIGO
fNom := ALLTRIM(GRUPOS->DESC1)
ENDIF
Endif
Else
oRet := .T.
fCod := GRUPOS->CODIGO
fNom := ALLTRIM(GRUPOS->DESC1)
Endif
foCod:Refresh()
foNom:Refresh()
Return oRet
//=========================
STATIC Function BorraS1()
//=========================
If MsgYesNo( "Desea Borrar El Registro ? ")
if Dlk_reg()
Select H
mTotaligv := mTotalIgv - real_mt
mTotalCos := mTotalCos - plan_mt
Delete
commit
unlock
go top
obrw:refresh()
oTotaligv:Refresh()
oTotalCos:Refresh()
Endif
Endif
Return Nil
//=========================
Static function Limpia()
//=========================
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
oNumero:Refresh()
oCod:Refresh()
oDesc1:Refresh()
oFecha:Refresh()
oMts:Refresh()
oConcep1:Refresh()
oConcep2:Refresh()
oTotalcos:Refresh()
oTotaligv:Refresh()
oTotalReg:Refresh()
oBrw:Refresh()
return nil
//============================================================================================
STATIC FUNCTION bus_prof1( fProf,fCli,fNomcli,fMedprof,foProf,foCli,foNomCli,foMedprof,fCod )
//============================================================================================
Local oRet:= .f.
fProf := rellena(fProf,"0",7)
SELECT F2A
F2A->(OrdSetFocus("F2ACONS"))
SEEK FPROF + FCOD
IF FOUND()
oRet:= .T.
fCli := F2A->COD_CLI
FNomcli := F2A->NOM_CLI
fMedprof := F2A->TOTAL
ELSE
oret:= .f.
Msgalert("La proforma Digitada no Existe..................Verifique")
ENDIF
foProf:Varput(fProf)
focli:Varput(fCli)
foNomcli:Varput(fNomcli)
foMedprof:Varput(fMedprof)
foProf:Refresh()
focli:Refresh()
foNomcli:Refresh()
foMedprof:Refresh()
RETURN oRet
Gracias por contestar, el codigo es asi, es parte de un programa que usa encabezado - detalle y funcionan con esa logica , el post es mas bien por el error que me da un error en transform que nada tiene que ver con la definicion que tengo, y la pila de llamadas que me presenta que nada que ver con el codigo, este sistema esta hecho con fwh 8.02 y funciona desde hace un año, ahora que hice esa nueva captura es que me sale ese extraño error
Saludes desde Managua, Nicaragua, el codigo completo de esa nueva pantalla es el siguiente :
#include "FiveWin.ch"
#include "colors.ch"
#include "ord.ch"
#include "noway.ch"
#include "Report.ch"
Static mGrabar,mBorrar, mAnular, mNvoDoc,mTotalcos,mTotaligv,mTotalReg,mNomcli,oNomcli
static mNumero,mCod,mDesc1,mFecha,mMts,mObser1,mObser2,oNumero,oCod,oDesc1,oFecha,oMts,oObser1,oObser2
static oProf,mProf,oCli,mCli,mMedProf,mConsumo,oMedProf,oConsumo,FilMovi, FilNtx, oSay1,oBrw,oBtagre,oBtborra,oBtmodi
Static mEditar, mSiNuevo, mAceptar, mCancelar, oDlg2, wcan,SiNuevo, oAceptar, oCancelar, oSalir
//====================
FUNCTION FISICO3()
//====================
Local oDlg,oBrush,oInfobar
Local oFont1,aStruct
LoadLibrary("Bwcc32.dll")
DBCLOSEALL()
SYSREFRESH()
SELECT A
If Dlk_Abre("CONS_E",.F.) = .F.
close data
quit
Endif
SET INDEX TO CONS_E
Go Top
SELECT B
If Dlk_Abre("CONS_D",.F.) = .F.
close data
quit
Endif
SET INDEX TO CONS_D
Go Top
WCAN := FCOUNT()
PUBLIC CAMPO[WCAN]
aStruct := DbStruct()
FilMovi := "C:\"+ALLTRIM(PUSUARIO)+"\DATA1\MOV_CONS.dbf"
Erase (FilMovi)
DbCreate(FilMovi, aStruct)
SELECT C
If Dlk_Abre("GRUPOS",.F.) = .F.
close data
quit
Endif
Set Index to GRUPOS
Go Top
SELECT D
If Dlk_Abre("F2A",.F.) = .F.
close data
quit
Endif
Set Index to F2A
Go Top
SELECT H
IF DLk_Abre(FILMOVI,.T.) = .F.
Close Data
Quit
Endif
Store .F. To mEditar,mSiNuevo,mAceptar,mCancelar
DEFINE FONT oFont1 NAME "Tahoma" SIZE 0,-9 BOLD
DEFINE BRUSH oBrush FILENAME "Iron2.bmp"
Do While .T.
Select H
zap
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
store 0 to mTotalReg,mTotaligv,mTotalcos
mCancelar := .F.
Select H
DEFINE DIALOG oDlg RESOURCE 143 BRUSH oBrush TRANSPARENT FONT oFont1
REDEFINE INFOBAR oInfoBar ID 100 GRADIENT;
BITMAP "Notes.BMP" LEFT PROMPT "Registro de Cosumo de Telas " CENTER ;
COLOR CLR_WHITE TEXT "" LEFT COLOR CLR_YELLOW ;
OF oDlg UPDATE BORDER
REDEFINE GET oNumero VAR mNumero ID 121 OF oDlg VALID(BUS_CON2(@mnumero,@oNumero))
REDEFINE GET oCod Var mCod ID 101 of oDlg VALID(BUS_GRUPO(@mCod,@oCod,@mDesc1,@oDesc1))
REDEFINE GET oDesc1 Var mDesc1 ID 103 of oDlg WHEN .F.
REDEFINE GET oFecha Var mFecha ID 109 of oDlg PICTURE "99/99/9999"
REDEFINE GET mMts Var mMts ID 116 of oDlg PICTURE "999.99"
REDEFINE GET oConcep1 Var mConcep1 ID 114 of oDlg when mEditar
REDEFINE GET oConcep2 Var mConcep2 ID 115 of oDlg when mEditar
REDEFINE LISTBOX oBrw FIELDS H->PROF, ALLTRIM(H->NOM_CLI),TRANSFORM(H->PLAN_MT,"999.99"),TRANSFORM(H->REAL_MT,"999.99") ;
HEADERS "Proforma","Cliente al Que pertenece ","Plan Mts", "Real Mts" ;
FIELDSIZES 80,250,100,100 ;
ID 102 OF oDlg
oBrw:nClrForeFocus:= {|| CLR_YELLOW }
oBrw:nClrBackFocus:= {|| CLR_GREEN }
oBrw:bRClicked = { || oLbx:ShowSizes() }
oBrw:aJustify := {.F.,.F.,.F.,.F.}
oBrw:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(230,230,230),RGB(190,215,190))}
REDEFINE GET oTotalReg Var mTotalReg ID 119 of oDlg picture "999,999.99" when .F.
REDEFINE GET oTotaligv Var mTotaligv ID 120 of oDlg picture "999,999.99" when .F.
REDEFINE GET oTotalcos Var mTotalcos ID 104 of oDlg picture "999,999.99" when .F.
REDEFINE BUTTON ID 133 OF oDlg ;
ACTION ( mGrabar:=.T.,mBorrar:=.F.,GrabaSal2() ) WHEN mEDITAR
REDEFINE BUTTON ID 107 OF oDlg ACTION( mCancelar:=.T., oDlg:End())
REDEFINE BUTTON oBtagre ID 110 OF oDlg ACTION ( ModiSal2(.T.) ) WHEN mEDITAR
REDEFINE BUTTON oBtmodi ID 112 OF oDlg ACTION ( ModiSal2(.F.) ) When mEditar
REDEFINE BUTTON oBtborra ID 132 OF oDlg ACTION ( BorraS1() ) when mEditar
ACTIVATE DIALOG oDlg CENTERED
If mCancelar
Exit
Endif
ENDDO
CLOSE DATA
oFont1:End()
oBrush:End()
Return Nil
//=============================================
STATIC FUNCTION BUS_CON2(fNumfact,foNumfac)
//=============================================
local oRet
fNumFact := Rellena(fNumFact," ",7)
foNumFac:refresh()
SELECT A
a->(ordsetfocus(1))
if DbSeek( fNumFact )
IF A->ANULADA = .T.
MsgAlert("Lo siento el Documento Ha sido Anulado.....Verifique")
Return .F.
ELSE
oRet = .T.
mNvoDoc = .F.
mNumero := A->NUMERO
mCod := A->CODPROD
mDesc1 := A->DESC1
mFecha := A->FECHA
mMts := A->TOT_MTS
mConcep1 := A->OBSERVA1
mConcep2 := A->OBSERVA2
select A
endif
Else
mNvoDoc = .T.
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
Endif
oNumero:Refresh()
oCod:Refresh()
oDesc1:Refresh()
oFecha:Refresh()
oMts:Refresh()
oConcep1:Refresh()
oConcep2:Refresh()
Select H
Zap
mTotalcos := 0
mTotaligv := 0
mTotalReg := 0
set delete off
Select B
b->(ordsetfocus(1))
if DbSeek(fNumFact)
Do While Numero = fNumFact
Select B
If Deleted()
skip
loop
endif
For I = 1 To Wcan
Pasa = Field(I)
Campo = &Pasa
Next
mTotaligv := mTotaligv + Real_Mt
mTotalcos := mTotalcos + Plan_Mt
Select H
Append Blank
For I = 1 To Wcan
PASA = FIELD(I)
REPLACE &Pasa With Campo
Next
Select B
SKIP
Enddo
endif
Set Delete On
oRet := .T.
mEditar := .T.
Select H
go top
Refres1()
obrw:refresh()
Return oRet
//==========================
Static Function Refres1()
//==========================
oNumero:Refresh()
oCod:Refresh()
oDesc1:Refresh()
oFecha:Refresh()
oMts:Refresh()
oConcep1:Refresh()
oConcep2:Refresh()
oTotalcos:Refresh()
oTotaligv:Refresh()
oTotalReg:Refresh()
Return
//=================================
Static Function ModiSal2(SiNuevo)
//=================================
Local oDlg2,oBrush,oInfobar
Local Enllavar := .F.
Local mAceptar := .F.
IF SiNuevo
MPROF := SPACE(7)
MCLI := SPACE(4)
MNOMCLI := SPACE(40)
MMEDPROF := 0
MCONSUMO := 0
ELSE
MPROF := H->PROF
MCLI := H->COD_CLI
MNOMCLI := H->NOM_CLI
MMEDPROF := H->PLAN_MT
MCONSUMO := H->REAL_MT
mTotaligv := mTotalIgv - mCONSUMO
mTotalCos := mTotalCos - mMEDPROF
ENDIF
DEFINE BRUSH oBrush FILENAME "OSXBack.bmp"
DEFINE DIALOG oDlg2 RESOURCE 144 BRUSH oBrush TRANSPARENT
REDEFINE INFOBAR oInfoBar ID 100 GRADIENT;
BITMAP "WORKER.BMP" LEFT PROMPT "Registro de Consumos " CENTER ;
COLOR CLR_WHITE TEXT "" LEFT COLOR CLR_YELLOW ;
OF oDlg2 UPDATE BORDER
REDEFINE GET oProf VAR mProf Of oDlg2 ID 101 Valid( bus_prof1(@mProf,@mCli,@mNomcli,@mMedprof,@oProf,@oCli,@oNomCli,@oMedprof,@mCod))
REDEFINE GET oCli VAR mCli of oDlg2 ID 109 WHEN .F.
REDEFINE GET oNomCli VAR mNomCli of oDlg2 ID 102 WHEN .F.
REDEFINE GET oMedprof VAR mMedprof of oDlg2 ID 107 WHEN .F. PICTURE "999.99"
REDEFINE GET oConsumo Var mConsumo of oDlg2 ID 110 PICTURE "999.99"
REDEFINE BUTTONBMP ID 105 OF oDlg2 ;
ACTION( mAceptar:=.T. , oDlg2:End() ) BITMAP "garrow.bmp" PROMPT " Aceptar" TEXTRIGHT
REDEFINE BUTTONBMP ID 106 OF oDlg2 ;
ACTION( mAceptar:=.F. , oDlg2:End() ) BITMAP "delete0.bmp" PROMPT " Cancelar" TEXTRIGHT
ACTIVATE DIALOG oDlg2 CENTERED
Select H
mTotaligv := mTotaligv + mConsumo
mTotalCos := mTotalcos + mMedprof
mTotalReg := mMts - mTotalIgv
oTotalcos:Refresh()
oTotaligv:Refresh()
oTotalReg:Refresh()
If mAceptar
If SiNuevo
Select H
rlock()
Append Blank
Endif
H->NUMERO := MNUMERO
H->CODPROD := MCOD
H->DESC1 := MDESC1
H->FECHA := MFECHA
H->TOT_MTS := MMTS
H->PROF := MPROF
H->COD_CLI := MCLI
H->NOM_CLI := MNOMCLI
H->PLAN_MT := MMEDPROF
H->REAL_MT := MCONSUMO
H->FECMOV := DATE()
H->HORMOV := AMPM(TIME())
Endif
oBrw:Refresh()
oBtagre:setfocus()
oTotalCos:Refresh()
oTotalReg:Refresh()
oTotaligv:Refresh()
Return Nil
//========================
Static Function GrabaSal2
//========================
SELECT A
a->(ordsetfocus(1))
IF DbSeek(mNumero)
If Dlk_REG()
Enllavado := .T.
Endif
Else
If Dlk_APPEN()
Enllavado := .T.
Endif
Endif
If enllavado
A->NUMERO := mNumero
A->CODPROD := mCod
A->DESC1 := mDesc1
A->FECHA := mFecha
A->TOT_MTS := mMts
A->OBSERVA1 := mConcep1
A->OBSERVA2 := mConcep2
A->FECMOV := DATE()
A->HORMOV := AMPM(TIME())
Unlock
Else
Return
Endif
SELECT B
b->(ordsetfocus(1))
SET DELETE ON
IF DbSeek( MNumero )
DO WHILE B->NUMERO = MNumero
IF DLK_REG()
DELETE
UNLOCK
ENDIF
SKIP
ENDDO
SET DELETE OFF
ENDIF
Select H
pack
Go Top
Set Delete Off
Do While .Not. Eof()
Select H
For I = 1 to Wcan
Pasa = Field(I)
Campo = &Pasa
Next
Select B
If Dlk_Appen()
For I = 1 to Wcan
Pasa = Field(I)
Replace &Pasa With Campo
Next
Endif
Unlock
Select H
Skip
Enddo
Set Delete On
Select H
Zap
mEditar := .F.
mTotalCos := 0
mTotaligv := 0
mTotalReg := 0
Refres1()
oNumero:SetFocus()
//ENDIF
//impsal(mtipo,mnumero)
Limpia()
return
//======================================================
Static Function bus_grupo(fCod,foCod,fNom,foNom)
//======================================================
Select GRUPOS
GRUPOS->(OrdSetFocus(1))
If !DbSeek( fCod )
oRet := .F.
If MsgYesNo("Codigo de Producto No Existe en el Catalogo")
fCod = dBasist("CODPROD3")
If fCod # ""
oRet := .F.
Else
KEYBOARD CHR(13)
fCod := GRUPOS->CODIGO
fNom := ALLTRIM(GRUPOS->DESC1)
ENDIF
Endif
Else
oRet := .T.
fCod := GRUPOS->CODIGO
fNom := ALLTRIM(GRUPOS->DESC1)
Endif
foCod:Refresh()
foNom:Refresh()
Return oRet
//=========================
STATIC Function BorraS1()
//=========================
If MsgYesNo( "Desea Borrar El Registro ? ")
if Dlk_reg()
Select H
mTotaligv := mTotalIgv - real_mt
mTotalCos := mTotalCos - plan_mt
Delete
commit
unlock
go top
obrw:refresh()
oTotaligv:Refresh()
oTotalCos:Refresh()
Endif
Endif
Return Nil
//=========================
Static function Limpia()
//=========================
mNumero := SPACE(7)
mCod := space(3)
mDesc1 := space(60)
mFecha := ctod("")
mMts := 0
mConcep1 := Space(80)
mConcep2 := Space(80)
oNumero:Refresh()
oCod:Refresh()
oDesc1:Refresh()
oFecha:Refresh()
oMts:Refresh()
oConcep1:Refresh()
oConcep2:Refresh()
oTotalcos:Refresh()
oTotaligv:Refresh()
oTotalReg:Refresh()
oBrw:Refresh()
return nil
//============================================================================================
STATIC FUNCTION bus_prof1( fProf,fCli,fNomcli,fMedprof,foProf,foCli,foNomCli,foMedprof,fCod )
//============================================================================================
Local oRet:= .f.
fProf := rellena(fProf,"0",7)
SELECT F2A
F2A->(OrdSetFocus("F2ACONS"))
SEEK FPROF + FCOD
IF FOUND()
oRet:= .T.
fCli := F2A->COD_CLI
FNomcli := F2A->NOM_CLI
fMedprof := F2A->TOTAL
ELSE
oret:= .f.
Msgalert("La proforma Digitada no Existe..................Verifique")
ENDIF
foProf:Varput(fProf)
focli:Varput(fCli)
foNomcli:Varput(fNomcli)
foMedprof:Varput(fMedprof)
foProf:Refresh()
focli:Refresh()
foNomcli:Refresh()
foMedprof:Refresh()
RETURN oRet
... Desde la Tierra de lagos y Volcanes......
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: UN ERROR RARO
Ramón,
El error parece estar aqui:
Fijate que estas usando la misma variable para el objeto GET a crear que para el valor a editar.
Debería ser asi:
La pista me la dió esta línea en el error.log:
El error parece estar aqui:
Code: Select all
REDEFINE GET mMts Var mMts ID 116 of oDlg PICTURE "999.99"
Debería ser asi:
Code: Select all
REDEFINE GET oMts Var mMts ID 116 of oDlg PICTURE "999.99"
pues ahí muestra el PICTURE "999.99"Error description: Error BASE/1122 Argument error: TRANSFORM
Args:
[ 1] = O Object
[ 2] = C 999.99
- Ramon Paredes
- Posts: 215
- Joined: Fri Feb 02, 2007 3:38 pm
- Location: Managua, Nicaragua
Re: UN ERROR RARO (SOLUCIONADO)
Antonio:
Gracias por tu respuesta, efectivamente ya se ejecuta sin problemas, el error era precisamente ese, la variable y el objeto con el mismo nombre, uffffff a descansar un poco mas,
Saludes desde Managua, Nicaragua
Ramon Paredes
Gracias por tu respuesta, efectivamente ya se ejecuta sin problemas, el error era precisamente ese, la variable y el objeto con el mismo nombre, uffffff a descansar un poco mas,
Saludes desde Managua, Nicaragua
Ramon Paredes
... Desde la Tierra de lagos y Volcanes......