DcSay get on DcTabPage wrong operation

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

DcSay get on DcTabPage wrong operation

#1 Post by PedroAlex »

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.

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

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
Pedro Alexandre

User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

Re: DcSay get on DcTabPage wrong operation

#2 Post by PedroAlex »

Roger,

This error occurs with any get in all situations.
Gets are directly over file fields

Attached sample program
Attachments
Teste_2020.rar
(216.4 KiB) Downloaded 558 times
Pedro Alexandre

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DcSay get on DcTabPage wrong operation

#3 Post by rdonnay »

Are you sure that you are using build 264?

If so, then you cannot use DC_XbpGetSetInputFocusBlock().
That was added in build 265.

You need to tell me what error you are getting.
The eXpress train is coming - and it has more cars.

User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

Re: DcSay get on DcTabPage wrong operation

#4 Post by PedroAlex »

Roger,

See this vídeo..

This happen on Win 10 and Win 7.

I´m using eXpress Build 267 and xBase 2.0.1113.

This problem happen only on edit File field.
On MemVar get run ok.
Attachments
Video_Demo.rar
(161.33 KiB) Downloaded 576 times
Pedro Alexandre

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DcSay get on DcTabPage wrong operation

#5 Post by rdonnay »

It appears that the most current version of Xbase++ is not allowing the Alias to be used in the GET.

eXpress++ builds a Get-Set code block using DC_GetAnchorCB() and now it is no longer working.

If you remove the Alias then it works ok.

Add this at the beginning of your program:

Code: Select all

DC_AutoLockEditedRecord(.f.) 
The eXpress train is coming - and it has more cars.

User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

Re: DcSay get on DcTabPage wrong operation

#6 Post by PedroAlex »

Roger,

This solution solve this problem.
DC_AutoLockEditedRecord(.f.) at the begin of programs

I find this change very strange.
What more surprises of this kind can I find?

Anyway thank you very much for the security it gives us.

best regards.
Pedro Alexandre

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DcSay get on DcTabPage wrong operation

#7 Post by rdonnay »

What more surprises of this kind can I find?
The year 2020 may bring many surprises.
The eXpress train is coming - and it has more cars.

Post Reply