Page 1 of 2

Programa travando apos upgrade 1604 e 1605 (RESOLVIDO)

Posted: Wed Aug 17, 2016 6:12 pm
by augustogomes
Good afternoon people

After changing my FiveWin to the latest version of 1604 and 1605, I'm having trouble running some routines. The program simply freezes.
I found that the error occurs on XBROWSE when using images in the header and lines. Removing the images the program works fine on Windows 10 and Windows 7, but does not work in Windows XP (closes the program without giving error messages).

In windows 7 the error that generates is as follows:

unrecoverable error 9015:

product expected hb_vmDo symbol ()

How to solve this? Both Windows 7.8.10 and Windows XP / 2003

I am compiling with five1605, xHarbour latest (contrib) 1.2.3 20160705 and r bcc70.
I tried it with version xHarbour 1605 and is the same mistake.

Re: Programa travando apos upgrade 1604 e 1605

Posted: Wed Aug 17, 2016 7:43 pm
by Antonio Linares
Augusto,

Could you provide a small and self contained example to reproduce the error ?

many thanks

Re: Programa travando apos upgrade 1604 e 1605

Posted: Wed Aug 17, 2016 8:29 pm
by augustogomes
Antonio,
I don't have an example. Because the error only occurs in the routines that have xbrowse with images, I'll show you an example function.

In this code, if I take the pictures the error does not occur.
But in Windows XP the error continues, in WIN7, WIN8 and WIN10 error does not occur when you remove the resouces, bitmaps

Code: Select all

Static Function I_CriaBrowseMat(nlTotItens)
        
  REDEFINE XBROWSE oBrw3021 ID 4049 OF oFld3021:aDialogs[1] ;
     ARRAY oClassVen:aDados FOOTERS LINES ; //FONT oFntN10 COLOR nRgb(0,0,0),nRgb(180,200,230) ;
    COLUMNS 2,30,3,31,4,5,6,9,7,28,38,26,27,8,39,40,41,42,43,44,45;      //21 colunas
     HEADERS "Seq","Cj","Código","Código Auxiliar","Descrição","Unid" ,"Qtde","Origem","Preço" ,"Ncm","CFOP","Base ST" ,"ICMS ST","O.R.I.",;
     "B ICMS Dest","% FCP ","%ICMS Dest","%ICMS Inter","Vlr FCP Destino","Vlr ICMS Destino","Vlr ICMS Origem";
     PICTURES ,"9","9999999","999999999999999","@!","!!", "@E 999999.999","@E 999,999.99","@E 999,999.9999","9999",,"@E 999,999.9999","@E 999,999.9999","@E 999,999.9999",;
         "@E 999,999.9999","99.99","99.99","99.99","@E 999,999.9999","@E 999,999.9999","@E 999,999.9999"
 
  
   oBrw3021:lAllowColHiding   := .F.  // Não Mostra o Menu
   oBrw3021:cToolTip := "Para Incluir Pressione INSERT"+CRLF+"Para Excluir Pressione DELETE"

   oBrw3021:lRecordSelector  := .F.
   oBrw3021:nColDividerStyle := LINESTYLE_BLACK
   oBrw3021:nRowDividerStyle := LINESTYLE_BLACK
   oBrw3021:nMarqueeStyle    := MARQSTYLE_HIGHLCELL 
   
    oBrw3021:lAllowColSwapping:= .F.  //----------------------------> Trocar Colunas
    oBrw3021:lAllowRowSizing  := .F.  //----------------------------> Nao move as Linhas
    oBrw3021:nFreeze          := 5
    oBrw3021:nColSel          := 2
    oBrw3021:bClrSel          := {|| {CLR_BLACK,CLR_WHITE}}
    oBrw3021:bClrSelFocus     := {|| {CLR_BLACK,nRGB( 160, 180, 255 )}}
    oBrw3021:bValid := {|| IF(dVenAberta(),IF(oClassVen:Confere(),olObj302:I_Imposto(.t.),.F.),.T.) } 
// oBrw3021:bWhen := {||.f.}
    oBrw3021:aCols[ 1 ]:nWidth        := 42 //32
    oBrw3021:aCols[ 1 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 1 ]:nHeadStrAlign := AL_CENTER
    oBrw3021:aCols[ 1 ]:AddResource("BrwSem")
    oBrw3021:aCols[ 1 ]:AddResource("BrwInc")
    oBrw3021:aCols[ 1 ]:AddResource("BrwAlt")
    oBrw3021:aCols[ 1 ]:AddResource("BrwExc")
    oBrw3021:aCols[ 1 ]:bBmpData      := {|| LEN(oClassVen:aDados[oBrw3021:nArrayAt]:Status) }
    oBrw3021:aCols[ 1 ]:nDataBmpAlign := AL_LEFT 
    oBrw3021:aCols[ 1 ]:cToolTip := "Clique Duplo na coluna sequência, edita o item"
    oBrw3021:aCols[ 1 ]:blDClickData  := {|oGet, oCol| I_EditaItem(oClassVen:aDados, oBrw3021:nArrayAt,oBrw3021:aCols[ 3 ] ) }   //I_EditaItem(oClassVen:aDados, oBrw3021:nArrayAt )
 
    oBrw3021:aCols[ 1 ]:AddResource( "EDITA" )
   oBrw3021:aCols[ 1 ]:nHeadBmpNo    := 5
   oBrw3021:aCols[ 1 ]:nHeadBmpAlign := AL_RIGHT
    
    // Quarta Coluna
    oBrw3021:aCols[ 2 ]:nWidth         := 15
    oBrw3021:aCols[ 2 ]:nDataStrAlign  := AL_CENTER
    oBrw3021:aCols[ 2 ]:nHeadStrAlign  := AL_CENTER
    oBrw3021:aCols[ 2 ]:bEditValid   := { | oGet, oCol | ( F_AlteraArray( oClassVen:aDados, oBrw3021, oGet, 30 ),oClassVen:AgrupaConjunto( oGet ),.t.) }
// Segunda Coluna
    oBrw3021:aCols[ 3 ]:nWidth       := 75
    oBrw3021:aCols[ 3 ]:bOnPostEdit  := { | oCol, xVal, nKey | If( nKey == VK_RETURN,,) }   
    oBrw3021:aCols[ 3 ]:bEditBlock   := { | oGet, oCol| F_PesqCom2( oBrw3021,oGet , oCol, oClassVen, "PED" ) }
   oBrw3021:aCols[ 3 ]:bEditValid   := { | oGet, oCol | IF(I_VerificaCodigo( oGet ),IF(F_PesqMat2(oGet:Value(), oBrw3021, oGet, oCol, oClassVen, "PED" ), (oBrw3021:nColSel := 7,F_AlteraArray( oClassVen:aDados, oBrw3021, oGet, 3 ),.T.),.F.),.F.) }
    oBrw3021:aCols[ 3 ]:Cargo := .T.
    oBrw3021:aCols[ 3 ]:addResource( "LUPA2" )
    oBrw3021:aCols[ 3 ]:nBtnBmp := 1   
    oBrw3021:aCols[ 3 ]:bRClickData   := {|nRow, nCol | I_BrowseItemMenu(nRow, nCol, oBrw3021) }
    
   oBrw3021:bRClicked := { | nRow, nCol | I_BrowseItemMenu( nRow, nCol, oBrw3021 ) }
   
// Segunda Coluna
    oBrw3021:aCols[ 4 ]:nWidth       := 85
    oBrw3021:aCols[ 4 ]:bEditBlock   := { | oGet, oCol| F_PesqCom2( oBrw3021, , oCol, oClassVen, "PED" ) }
   oBrw3021:aCols[ 4 ]:bEditValid   := { | oGet, oCol | IF(I_VerificaCodigo( oGet ),IF(F_PesqMat2(oGet:Value(), oBrw3021, oGet, oCol, oClassVen, "PED" ), F_AlteraArray( oClassVen:aDados, oBrw3021, oGet, 4 ),.F.),.F.) }
    oBrw3021:aCols[ 4 ]:Cargo := .T.
    oBrw3021:aCols[ 4 ]:addResource( "LUPA2" )
    oBrw3021:aCols[ 4 ]:nBtnBmp := 1  
    oBrw3021:aCols[3]:cFooter       := "Total de Itens:" 
  
    
       oBrw3021:aCols[4]:lTotal        := .T.  
         oBrw3021:aCols[ 4 ]:cFooter := TRANS( nlTotItens, "@E 999" )

// Terceita Coluna
    oBrw3021:aCols[ 5 ]:nHeadStrAlign := AL_CENTER
    oBrw3021:aCols[ 5 ]:nDataStrAlign := AL_LEFT
    oBrw3021:aCols[ 5 ]:bOnPostEdit  := { | oCol, xVal, nKey | If( nKey == VK_RETURN, oClassVen:aDados[ oBrw3021:nArrayAt ]:NomMat := IF( "@" $ oClassVen:aDados[ oBrw3021:nArrayAt ]:NomMat, xVal, oClassVen:aDados[ oBrw3021:nArrayAt ]:NomMat),) }
    oBrw3021:aCols[ 5 ]:bEditBlock   := { || I_MostraProdutos( oClassVen:aDados[ oBrw3021:nArrayAt ]:CodMat ) }
    oBrw3021:aCols[ 5 ]:addResource( "olho" )
    oBrw3021:aCols[ 5 ]:nBtnBmp := 1     

// Quarta Coluna
    oBrw3021:aCols[ 6 ]:nWidth         := 30
    oBrw3021:aCols[ 6 ]:cEditPicture   := "!!"
    oBrw3021:aCols[ 6 ]:nDataStrAlign  := AL_CENTER
    oBrw3021:aCols[ 6 ]:nHeadStrAlign  := AL_CENTER
// Quinta Coluna

    oBrw3021:aCols[ 7 ]:nWidth        := 63
    oBrw3021:aCols[ 7 ]:bOnPostEdit   := { | oCol, xVal, nKey | If( nKey == VK_RETURN, (oClassVen:aDados[ oBrw3021:nArrayAt ]:QtdMat := xVal,olObj302:I_Imposto(.t.)),) }
    oBrw3021:aCols[ 7 ]:bEditValid    := { | oGet, oCol | I_VerSaldo(),F_AlteraArray( oClassVen:aDados, oBrw3021, oGet, 6 ) }
    oBrw3021:aCols[ 7 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 7 ]:nHeadStrAlign := AL_CENTER
    oBrw3021:aCols[ 7 ]:AddResource("BrwSem")
    oBrw3021:aCols[ 7 ]:AddResource("BrwExc")
   oBrw3021:aCols[ 7 ]:nHeadBmpNo    := 1
   oBrw3021:aCols[ 7 ]:nHeadBmpAlign := AL_RIGHT
   oBrw3021:aCols[ 7 ]:bClrStd := {|| IF( oClassVen:aDados[oBrw3021:nArrayAt]:EstMat .AND. EMPTY(oClassVen:dvDatNot), {CLR_WHITE, CLR_HRED},{CLR_BLACK,CLR_WHITE }) }

// Sétima Coluna
    oBrw3021:aCols[ 8 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 8 ]:nHeadStrAlign := AL_CENTER
// _ Coluna
    oBrw3021:aCols[ 9 ]:nWidth        := 75
    oBrw3021:aCols[ 9 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 9 ]:nHeadStrAlign := AL_CENTER
    oBrw3021:aCols[ 9 ]:bOnPostEdit   := { | oCol, xVal, nKey | If( nKey == VK_RETURN, (oClassVen:aDados[ oBrw3021:nArrayAt ]:PreUni := oClassVen:aDados[ oBrw3021:nArrayAt ]:PreOri := xVal,olObj302:I_Imposto(.t.)),) }
    oBrw3021:aCols[ 9 ]:bEditValid    := { | oGet, oCol | F_AlteraArray( oClassVen:aDados, oBrw3021, oGet, 7 ) }


// Quarta Coluna
    oBrw3021:aCols[ 10 ]:AddResource( "OLHOP" )
   oBrw3021:aCols[ 10 ]:nHeadBmpNo    := 1
   oBrw3021:aCols[ 10 ]:nHeadBmpAlign := AL_RIGHT

    oBrw3021:aCols[ 10 ]:nWidth         := 44
    oBrw3021:aCols[ 10 ]:nDataStrAlign  := AL_CENTER
    oBrw3021:aCols[ 10 ]:nHeadStrAlign  := AL_LEFT
    oBrw3021:aCols[ 10 ]:cToolTip := "Clique Duplo na coluna NCM, mostra dados NCM"
   oBrw3021:aCols[ 10 ]:blDClickData  := {|| sup303():I_MostraNBM(oClassVen:aDados,oBrw3021,oClassVen:aDados[ oBrw3021:nArrayAt ]:CodNbm ) }

    oBrw3021:aCols[ 11 ]:nWidth         := 34
    oBrw3021:aCols[ 11 ]:nHeadStrAlign  := AL_CENTER
    oBrw3021:aCols[ 11 ]:bEditValid    := { | oGet, oCol | F_AlteraArray( oClassVen:aDados, oBrw3021, oGet, 38 ) }

// Quarta Coluna
    oBrw3021:aCols[ 12 ]:nWidth         := 75
    oBrw3021:aCols[ 12 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 12 ]:nHeadStrAlign := AL_CENTER
// Quarta Coluna
    oBrw3021:aCols[ 13 ]:nWidth         := 75
    oBrw3021:aCols[ 13 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 13 ]:nHeadStrAlign := AL_CENTER
// Oitava Coluna
    oBrw3021:aCols[ 14 ]:nDataStrAlign := AL_RIGHT
    oBrw3021:aCols[ 14 ]:nHeadStrAlign := AL_CENTER

    for klCont:=15 to 21
        oBrw3021:aCols[ klcont ]:nDataStrAlign := AL_RIGHT
        oBrw3021:aCols[ klcont ]:nHeadStrAlign := AL_CENTER
    next    

//   Ajustes da Browse
    FOR klcont:=2 TO LEN( oBrw3021:aCols )
        oBrw3021:aCols[ klcont ]:lAllowSizing := .F.
        oBrw3021:aCols[ klcont ]:bRClickHeader = {|| NIL }
        oBrw3021:aCols[ klcont ]:cToolTip := "Para Incluir Pressione INSERT"+CRLF+"Para Excluir Pressione DELETE"
    NEXT
    oBrw3021:aCols[ 3 ]:cToolTip := "Clique Botão Direito do Mouse na coluna Código, abre menu Item"
    oBrw3021:aCols[ 10 ]:cToolTip := "Clique Duplo na coluna NCM, mostra dados NCM"
     *

return .t.      

 

Re: Programa travando apos upgrade 1604 e 1605

Posted: Thu Aug 18, 2016 8:21 pm
by augustogomes
After I declare and active the xbrowse whenever I change the array, step by these commands

I'm doing the wrong Xbrowse?

Code: Select all

        oBrw3021:aArrayData    := oClassVen:aDados
        oBrw3021:nFreeze          := 5
        oBrw3021:nColSel          := 2
        oBrw3021:nMarqueeStyle := IF(!EMPTY(oClassVen:cvCtrFat), MARQSTYLE_HIGHLROWRC, MARQSTYLE_HIGHLCELL )
        oBrw3021:bKeyDown      := IF(!EMPTY(oClassVen:cvCtrFat), {|| NIL}, {|nKey| olObj302:I_BrwKey( nkey,1 ) } )
        oBrw3021:lFastEdit     := IF(!EMPTY(oClassVen:cvCtrFat), .F., .T. )
        oBrw3021:lAutoAppend   := IF(!EMPTY(oClassVen:cvCtrFat), .F., .T. )
        oBrw3021:aCols[ 2 ]:nEditType := IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET )
        oBrw3021:aCols[ 3 ]:nEditType := IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET_BUTTON )
        oBrw3021:aCols[ 4 ]:nEditType := IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET_BUTTON )
        oBrw3021:aCols[ 5 ]:nEditType := EDIT_GET_BUTTON    //IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET_BUTTON )
        oBrw3021:aCols[ 7 ]:nEditType := IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET )
        oBrw3021:aCols[ 9 ]:nEditType := IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET )
        oBrw3021:aCols[4]:lTotal        := .T.  
               oBrw3021:aCols[ 4 ]:cFooter := TRANS( nlTotItens, "@E 999" )
               oBrw3021:aCols[ 5 ]:RefreshFooter()
   
            oBrw3021:aCols[ 11 ]:nEditType := IF(!EMPTY(oClassVen:cvCtrFat), EDIT_NONE, EDIT_GET )
            
        oBrw3021:Refresh(.T.)

 

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 5:59 am
by Antonio Linares
It seems ok. Without a self contained example we can't test it here.

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 9:42 am
by nageswaragunupudi
In this code, if I take the pictures the error does not occur.
But in Windows XP the error continues, in WIN7, WIN8 and WIN10 error does not occur when you remove the resouces, bitmaps
Please add this line immediately after defining XBrowse

Code: Select all

oBrw3021:lGDIP := .f.
 
Please let us know if the problem continues even after this change.

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 4:24 pm
by g.hernandes
I have the same problem after compilr my project in FWH 1604

the problem occurs in this line

oBrw:aCols[2]:nEditType := EDIT_BUTTON
oBrw:aCols[2]:AddResource( "DOWN" )
oBrw:aCols[2]:nBtnBmp := 1 // if I ignore this line to give the error


compiling samples in the xbrbtn.prg will prg the same error occurs

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 4:31 pm
by nageswaragunupudi
When I build and run xbrbtn.prg, this is my output

Image

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 4:33 pm
by g.hernandes
nageswaragunupudi wrote:When I build and run xbrbtn.prg, this is my output

Image


friend if u move the button , you will see that the will to respond to close

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 4:35 pm
by nageswaragunupudi
So, it is working for us but not for you.

1) Please make sure you are using bcc7
2) Please check buildx.bat or buildh.bat in \fwh\samples folder and make sure you are including all the libs in that bat file in your link script.
3) Also if you let us know the result of including the line I posted above, that gives us an idea why you are having that problem.

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 4:38 pm
by nageswaragunupudi
friend if u move the button , you will see that the will to respond to close
Eveything is working fine here.
Not only in this test but in lots of software that is running live with many clients produced with the current versions of FWH

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 5:08 pm
by augustogomes
nageswaragunupudi

good afternoon, as passed already by other users the problem occurs when using edit_get_button and use image resourse, image bitmaps works normally.

Code: Select all

oBrw3021:aCols[ 3 ]]: nEditType: = EDIT_GET_BUTTON 
oBrw3021:aCols[ 3 ]:addResource( "LUPA2")
oBrw3021:aCols[ 3 ]:nBtnBmp := 1  
**************************************error*****************

if you do

Code: Select all

oBrw3021:aCols[ 3 ]: nEditType: = EDIT_GET_BUTTON 
oBrw3021:aCols[ 3 ]:addbitmap( "C:\desenv\fwh\bitmaps\16x16\about.bmp" )
oBrw3021:aCols[ 3 ]:nBtnBmp := 1  
NO ERRORS


I used your suggestion and error continues

oBrw3021:lGDIP := .f.

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 5:17 pm
by augustogomes
nageswaragunupudi

good afternoon, as passed already by other users the problem occurs when using edit_get_button and use image resourse, image bitmaps works normally.

Code: Select all

oBrw3021:aCols[ 3 ]: nEditType: = EDIT_GET_BUTTON 
oBrw3021:aCols[ 3 ]:addResource( "LUPA2")
oBrw3021:aCols[ 3 ]:nBtnBmp := 1  
 
**************************************error*****************

if you do

Code: Select all

oBrw3021:aCols[ 3 ]: nEditType: = EDIT_GET_BUTTON 
oBrw3021:aCols[ 3 ]:addbitmap( "C:\desenv\fwh\bitmaps\16x16\about.bmp" )
oBrw3021:aCols[ 3 ]:nBtnBmp := 1  
NO ERRORS


I used your suggestion and error continues

oBrw3021:lGDIP := .f.

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 5:19 pm
by augustogomes
excuse me problems with my browser doubled posting

Re: Programa travando apos upgrade 1604 e 1605

Posted: Fri Aug 19, 2016 5:28 pm
by Joaoalpande
CHANGE

oBrw3021:aCols[ 3 ]:addResource( "LUPA2")

oBrw3021:aCols[ 3 ]:SetCheck( { "LUPA2"})