Mr. Rao. xBrowse bug? (SOLVED)

Mr. Rao. xBrowse bug? (SOLVED)

Postby ctoas » Fri Feb 19, 2021 11:16 pm

Mr. Rao

In my previous post, you said that the way I built xBrowse was inadequate. Could you explain that?

The way you suggested it doesn't work properly, but the way I used it does it correctly.

See codes and equivalent images.

So it doesn't work

Image
Code: Select all  Expand view
@ 0069,0000 XBROWSE oBrwLOTES OF oDlgLOTES SIZE 0520,0230 STYLE FLAT PIXEL NOBORDER DATASOURCE oRsLOTES ;
        COLUMNS PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO),"quadra","lote","rua" ;
        HEADERS "Loteamento","Quadra","Lote","Rua" ;
        COLSIZES 0455,0065,0045,0455 ;
           PICTURES "@!","99","999","@!"   


So it works

Image
Code: Select all  Expand view
       @ 0069,0000 XBROWSE oBrwLOTES OF oDlgLOTES SIZE 0520,0230 STYLE FLAT PIXEL NOBORDER DATASOURCE oRsLOTES
            
        ADD TO oBrwLOTES DATA PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO) PICTURE "@!" HEADER "Loteamento" SIZE 0455
        ADD TO oBrwLOTES DATA oRsLOTES:quadra                                          PICTURE "@!" HEADER "99"        SIZE 0065
        ADD TO oBrwLOTES DATA oRsLOTES:lote                                            PICTURE "@!" HEADER "999"        SIZE 0045
        ADD TO oBrwLOTES DATA oRsLOTES:rua                                             PICTURE "@!" HEADER "Rua"        SIZE 0455 


I would like to understand why one way works and the other not even being the same despite an inadequate one.

Code: Select all  Expand view
***************************************************************************************************
STATIC FUNCTION PEGANOMELOTEAMENTO(cLOTEAMENTO,cNOMELOTEAMENTO)
***************************************************************************************************
   
    IF oRsLOTEAMENTOS:Seek(cLOTEAMENTO) 
    cNOMELOTEAMENTO := STRZERO(cLOTEAMENTO,3) + " - " + ALLTRIM(oRsLOTEAMENTOS:nome)
    ELSE
        cNOMELOTEAMENTO := "Loteamento não encontrado"
    ENDIF

RETURN cNOMELOTEAMENTO
Last edited by ctoas on Sat Feb 20, 2021 4:48 pm, edited 1 time in total.
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
User avatar
ctoas
 
Posts: 115
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil

Re: Mr. Rao. xBrowse bug?

Postby nageswaragunupudi » Sat Feb 20, 2021 3:08 am

Code: Select all  Expand view
       COLUMNS { || PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO) },"quadra","lote","rua" ;
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Mr. Rao. xBrowse bug?

Postby ctoas » Sat Feb 20, 2021 4:48 pm

I hadn't thought of a code block.

Thanks.
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
User avatar
ctoas
 
Posts: 115
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 65 guests