DcSay get on DcTabPage wrong operation
Posted: Fri Jan 10, 2020 2:10 am
Hi Roger,
My problema is :
Yesterday I compiled some applications with eXpress 267 and XB 2.01113
and there was a wrong operation in DCay get and combo over a dctabpage.
This code runs OK with eXpress 264 and XB 2.01113.
If I change this :
RETURN {|n|aSimNao[n,1]}
to this
RETURN {|n|ARTIGOS->UNIDADE2 := aSimNao[n,1]}
It works fine but this represente a lot of changes in alll my code.
I think there will be a more effective solution
Many thanks
Best regards
My problema is :
Yesterday I compiled some applications with eXpress 267 and XB 2.01113
and there was a wrong operation in DCay get and combo over a dctabpage.
This code runs OK with eXpress 264 and XB 2.01113.
Code: Select all
//----------------------------------------------
FUNCTION Teste_ListBox()
LOCAL GetList[0], GetOptions, aSimNao := { { 'Sim',1 }, { 'Não',2 }, { 'Off',3 } } //, cCampo1:='S', cCampo2:='S', cCampo3:='S'
DbUseArea( .t., 'FOXCDX', 'ARTMES.DBF', 'ARTIGOS', .t., .f. )
ARTIGOS->( DbGoTop() )
Do while .t.
IF ARTIGOS->( DbRLock() )
@ 0,0 DcTabpage TABPAGE1 Caption '1' size 85,23 preoffset 0 postoffset 87 FONT '10.Arial Bold'
@ 1.5,1 dcgroup POS caption 'Configuração POS' size 40,20 parent TABPAGE1 COLOR NIL,0
@ 2,01 dcsay ' Teste 1' get ARTIGOS->UNIDCOMP GETSIZE 4,1 SAYRIGHT Parent POS ;
COMBO HEIGHT 3 WIDTH 8 ;
DATA aSimNao ELEMENT 1 ;
RETURN {|n|aSimNao[n,2]} ;
LISTFONT '9.Courier Bold'
@ 4,01 dcsay ' Teste 2' get ARTIGOS->UNIDVEND sayright GETSIZE 4,1 Parent POS ;
COMBO HEIGHT 3 WIDTH 8 ;
DATA aSimNao ELEMENT 1 ;
RETURN {|n|aSimNao[n,2]} ;
LISTFONT '9.Courier Bold' ;
@ 6,01 dcsay ' Teste 3' get ARTIGOS->IVACOMPRAS sayright GETSIZE 4,1 Parent POS ;
COMBO HEIGHT 3 WIDTH 8 ;
DATA aSimNao ELEMENT 1 ;
RETURN {|n|aSimNao[n,2]} ;
LISTFONT '9.Courier Bold' ;
@ 8,01 dcsay ' Teste 3' get ARTIGOS->UNIDADE sayright picture "!!!!!" Parent POS ;
COMBO HEIGHT 3 WIDTH 8 ;
DATA aSimNao ELEMENT 1 ;
RETURN {|n|aSimNao[n,1]} ;
LISTFONT '9.Courier Bold' ;
@ 10,01 dcsay ' Teste 3' get ARTIGOS->UNIDADE2 sayright picture "!!!!!" Parent POS ;
COMBO HEIGHT 3 WIDTH 8 ;
DATA aSimNao ELEMENT 1 ;
RETURN {|n|aSimNao[n,1]} ;
LISTFONT '9.Courier Bold' ;
DCGETOPTIONS SAYFONT '10.Arial Bold' NOMAXBUTTON NOMINBUTTON BUTTONALIGN DCGUI_BUTTONALIGN_CENTER NORESIZE
DCREAD GUI ;
TITLE 'Testar ListBox' ;
FIT ;
OPTIONS GetOptions ;
ADDBUTTONS
ARTIGOS->( DbRUnLock() )
Exit
Endif
Enddo
Close ARTIGOS
RETURN nil
RETURN {|n|aSimNao[n,1]}
to this
RETURN {|n|ARTIGOS->UNIDADE2 := aSimNao[n,1]}
It works fine but this represente a lot of changes in alll my code.
I think there will be a more effective solution

Many thanks
Best regards