after completing the program, when I tried to select an item in the dropdown menu, I got this error back.
- Code: Select all Expand view
- Error description: Error BASE/1124 Argument error: LEFT
Args:
[ 1] = N 1
[ 2] = N 2
Stack Calls
===========
Called from: => LEFT(0)
Called from: \ric98\fattura3.prg => FOKTIPODOC(43)
Called from: \ric98\fattura1.prg => (b)FEDITFATTURA(356)
Called from: => TDIALOG:INITIATE(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOX(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: \ric98\fattura1.prg => FEDITFATTURA(356)
Called from: \ric98\fattura2.prg => FAGGFATTURA(66)
Called from: => (b)EVAL(162)
Called from: \winlibco\utility.prg => ESEGUIBLOCK(448)
Called from: main.prg => (b)MENUPRINCIPALE(162)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: main.prg => MAIN(52)
Variables in use
================
Procedure Type Value
==========================
LEFT
Param 1: N 1
Param 2: N 2
Local 1: N 0
FOKTIPODOC
Param 1: L .T.
Param 2: L .T.
Param 3: C " "
Local 1: N 2
Local 2: U
Local 3: U
(b)FEDITFATTURA
Param 1: O Class: TDIALOG
TDIALOG:INITIATE
Param 1: N 1967454
Param 2: N 3868304
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 1967454
Param 3: N 3868304
Local 1: O Class: TDIALOG
DIALOGBOX
Param 1: N 4194304
Param 2: C "EDIT_FATT"
Param 3: N 11994382
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: B {|| ... }
Param 8: U
Param 9: U
Param 10: L .F.
Local 1: O Class: TDIALOG
Local 2: N 11994382
Local 3: U
Local 4: U
Local 5: S
Local 6: O Class: TDIALOG
FEDITFATTURA
Param 1: L .T.
Local 1: U
Local 2: N 2
Local 3: O Class: TDIALOG
Local 4: N 0
Local 5: L .T.
Local 6: L .T.
Local 7: U
Local 8: U
Local 9: L .F.
Local 10: A Len: 0
Local 11: O Class: TBUTTON
Local 12: L .F.
FAGGFATTURA
Local 1: L .F.
Local 2: N 1
(b)EVAL
ESEGUIBLOCK
Param 1: B {|| ... }
Param 2: O Class: TWBROWSE
Param 3: L .T.
Local 1: U
Local 2: N 4194304
(b)MENUPRINCIPALE
Param 1: O Class: TMENUITEM
TMENU:COMMAND
Param 1: N 132
Local 1: O Class: TMENU
Local 2: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 132
Param 2: N 0
Local 1: O Class: TWINDOW
Local 2: N 0
Local 3: N 132
Local 4: N 0
TWINDOW:HANDLEEVENT
Param 1: N 273
Param 2: N 132
Param 3: N 0
_FWH
Param 1: N 0
Param 2: N 273
Param 3: N 132
Param 4: N 0
Param 5: N 1
Local 1: O Class: TWINDOW
WINRUN
Param 1: N 11994382
TWINDOW:ACTIVATE
Param 1: C "NORMAL"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: B {|| ... }
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: B {|| ... }
Param 18: U
Param 19: U
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
MAIN
Local 1: U
Local 2: U
Local 3: U
Local 4: U
Local 5: O Class: TMENU
Local 6: O Class: TBRUSH
Local 7: O Class: TICON
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
1: ANACF RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .F. .T.
Indexes in use TagName
=> CLFR+CODCF ANACF1
CLFR + CODCF CODICE
CLFR+upper(RAGSOC) ANACF2
CLFR + Upper(RAGSOC) NOME
Relations in use
2: => TABGEN RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
118 244 .F. .F.
Indexes in use TagName
=> CHIAVE + CODICE TABGEN
Relations in use
3: TABFAT01 RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .F. .T.
Indexes in use TagName
TIPDOC+STR(NUMDOC,6) TABF11
=> dtos(datDOC)+TIPDOC+STR(NUMDOC,6) TABF13
Relations in use
1: TO "CAUMA"+tabfat01->caumag INTO TABGEN
2: TO tabfat01->clfr+tabfat01->codcf INTO ANACF
4: VETTORI RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> CLFR+CODCF ANACF1
CLFR + CODCF CODICE
CLFR+upper(RAGSOC) ANACF2
CLFR + Upper(RAGSOC) NOME
Relations in use
5: TABMAG RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 26 .F. .F.
Indexes in use TagName
=> CHIAVE + CODICE TABMAG
Relations in use
6: ARTCLI RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> CLFR+CODCF+CODART ARTCLI1
Relations in use
7: LISART RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> CHIAVE+STR(LISART,2)+CODART+CODCF+SLISART
Relations in use
8: AGENTI RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> CODAGE AGENTI11
Relations in use
9: LIBRIAZ RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
10 9 .F. .T.
Indexes in use TagName
Relations in use
10: GIACEN RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> CODMAG + CODART GIACEN1
Relations in use
11: TABFAT02 RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> TIPDOC+STR(NUMDOC,6) TABF21
Relations in use
12: TABFAT03 RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> TIPDOC+STR(NUMDOC,6)+STR(NUMRIG,2) TABF31
Relations in use
13: ARTICOLI RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
=> CODART ART1
upper(SUBSTR(DESART,1,15)) ART2
CODEAN ART3
Relations in use
14: PIACON RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
605 604 .F. .T.
Indexes in use TagName
=> CODCON PIACON1
upper(DESCON) PIACON2
Relations in use
Classes in use:
===============
1 HBCLASS
2 HBOBJECT
3 TFONT
4 TWINDOW
5 TDIALOG
6 TBRUSH
7 TCONTROL
8 TGET
9 GET
10 TCLIPGET
11 TBUTTON
12 TINI
13 TICON
14 TMENU
15 TMENUITEM
16 TMSGBAR
17 TRECT
18 TMSGITEM
19 TTIMER
20 TBITMAP
21 TWBROWSE
22 TSCROLLBAR
23 TBAR
24 TBTNBMP
25 ERROR
26 TCOMBOBOX
27 TFOLDER
28 TREG32
and this is the file fattura3.prg when i get error first
- Code: Select all Expand view
******************************************************************************/
function fOkTipoDoc(lRefresh,lAppend,mAutoFatt)
******************************************************************************/
local nArea:=select(),nRec,f_f
REQUEST DBFCDX
RddSetDefault( "DBFCDX" )
m->mDocFat:=left(m->mTipoDoc,2) [b] //left is here[/b]
if empty(m->mDocFat)
Messag9("Non presente tipo di documento")
return .f.
endif
SELE TABGEN
nRec:=recno()
SEEK "DOCFA"+m->mDocFat
if !found() // impossibile, ho l'elenco di tutti i documenti
errore_critico("Tipo documento")
endif
if lAppend
m->MNUMDOC=tabgen->NUM1+1
STORE tabgen->DAT1 TO m->MDATDOC,m->MDATREG
endif
if pcount()>2 // parametro aggiunto dopo
mAutoFatt:=SubStr(TABGEN->ALFA3, 1, 1)
endif
m->MCLFR=SUBSTR(tabgen->ALFA1,3,1)
m->MCAUMAG=SUBSTR(tabgen->ALFA2,1,3)
m->MCODMAG=SUBSTR(tabgen->ALFA1,4,2)
m->MINTESTA=SUBSTR(tabgen->ALFA1,1,2) && NUM.DOC. NUMERAZIONE
m->MREGIVA=STR(tabgen->NUM6,1) && REGISTRO CONTABILITA'
STORE .T. TO m->MSIMAG,m->MSICOG
IF m->MCAUMAG=" "
m->MSIMAG=.F. && NON PASSO IN MAGAZZINO
else
m->MSIMAG=.t. && NON PASSO IN MAGAZZINO
ENDIF
IF m->MREGIVA="0"
m->MSICOG=.F. && NON PASSO IN CONTABILITA'
ENDIF
m->MFLAG=0
IF m->MINTESTA <> " " .and. lAppend
SEEK "DOCFA"+m->MINTESTA
IF EOF()
MESSAG9(" Non esiste il documento "+m->MINTESTA+". Controllare tabella documenti")
return .f.
ENDIF
m->MNUMDOC=tabgen->NUM1+1
m->MDATDOC=tabgen->DAT1
if empty(m->mdatdoc)
m->mdatdoc=date()
endif
ENDIF
m->MULSTIVA=CTOD(" / / ")
IF m->MSICOG
SELE LIBRIAZ
LOCATE FOR libriaz->REGISTRO="I"+m->MREGIVA
m->MULSTIVA=libriaz->ULDTST
ENDIF
SELE TABGEN
SEEK "DOCPE"+m->MDOCFAT
IF EOF()
MESSAG9(" Non è stata fatta la personalizzazione del documento "+m->mdocfat)
return .f.
ENDIF
FOR F_F=1 TO 24
m->MCHIEDO[F_F]="N"
NEXT
m->MCHIEDO[1]=SUBSTR(tabgen->ALFA1,1,1)
m->MCHIEDO[2]=SUBSTR(tabgen->ALFA1,2,1)
m->MCHIEDO[3]=SUBSTR(tabgen->ALFA1,3,1)
m->MCHIEDO[4]=SUBSTR(tabgen->ALFA1,4,1)
m->MCHIEDO[5]=SUBSTR(tabgen->ALFA1,5,1)
m->MCHIEDO[6]=SUBSTR(tabgen->ALFA1,6,1)
m->MCHIEDO[7]=SUBSTR(tabgen->ALFA1,7,1)
m->MCHIEDO[8]=SUBSTR(tabgen->ALFA1,8,1)
m->MCHIEDO[9]=SUBSTR(tabgen->ALFA2,1,1)
m->MCHIEDO[10]=SUBSTR(tabgen->ALFA2,2,1)
m->MCHIEDO[11]=SUBSTR(tabgen->ALFA2,3,1)
m->MCHIEDO[12]=SUBSTR(tabgen->ALFA2,4,1)
m->MCHIEDO[13]=SUBSTR(tabgen->ALFA2,5,1)
m->MCHIEDO[14]=SUBSTR(tabgen->ALFA2,6,1)
m->MCHIEDO[15]=SUBSTR(tabgen->ALFA2,7,1)
m->MCHIEDO[16]=SUBSTR(tabgen->ALFA2,8,1)
m->MCHIEDO[17]=SUBSTR(tabgen->ALFA3,1,1)
m->MCHIEDO[18]=SUBSTR(tabgen->ALFA3,2,1)
m->MCHIEDO[19]=SUBSTR(tabgen->ALFA3,3,1)
m->MCHIEDO[20]=SUBSTR(tabgen->ALFA3,4,1)
m->MCHIEDO[21]=SUBSTR(tabgen->ALFA3,5,1)
m->MCHIEDO[22]=SUBSTR(tabgen->ALFA3,6,1)
m->MCHIEDO[23]=SUBSTR(tabgen->ALFA3,7,1)
m->MCHIEDO[24]=SUBSTR(tabgen->ALFA3,8,1)
SEEK "COGE1"
IF m->MCLFR="F"
m->MasCl=SUBSTR(tabgen->CODICE,3,2)
ELSE
m->MasCl=SUBSTR(tabgen->CODICE,1,2)
ENDIF
go nRec
select(nArea)
if lRefresh
m->oDatDoc:refresh()
m->oNumDoc:refresh()
m->oCaumag:refresh()
m->oCodmag:refresh()
m->oFld:update()
m->oFld:refresh()
endif
return .t.
Any idea?.thanks all for reply