xbrowse error fwh 8.08

Post Reply
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

xbrowse error fwh 8.08

Post by Richard Chidiak »

I get the following error with xbrowse fwh 8.08

Any idea ? same code working ok in fwh 8.07

thanks for the help,


Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL
Args:
[ 1] = U

Stack Calls
===========
Called from: => EVAL(0)
Called from: C:\CBATI32\xbrowse.PRG => (b)TXBROWSE:TXBROWSE(286)
Called from: => TXBROWSE:KEYCOUNT(0)
Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:ADJUST(789)
Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:INITIATE(697)
Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:CREATEFROMCODE(600)
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard,

What RDD are you using ?

It fails as oBrw:bKeyCount is nil. It should be oBrw:bKeyCount := {|| ( oBrw:cAlias )->( OrdKeyCount() ) }

Please try to define it yourself and try it again, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Post by Richard Chidiak »

Antonio

I am using dbfcdx and the same code has been working for some time, works ok in fwh 08.07

oBrw:bKeyCount is nil it should not

defining it does not fix the problem,

here is the code below

Regards

Richard

Code: Select all | Expand

IF OBRWPLA == NIL
   INITRANS13(@TRANS)

   @ wndpmain:nHeight - 90,05 BUTTONBMP TRANS[28][13] PROMPT "SEMAINE" OF wndpMAIN PIXEL SIZE 150,30 FONT TRANS[09][1] ;
      ACTION PLANHEBDO(@TRANS,OBRWPLA,TPAR)

   @ 10,200 XBROWSE oBrwpla ;
         OF wndpmain ;
         SIZE wndpmain:nwidth - 200,wndpmain:nHeight - 30 PIXEL ;
         ALIAS TRANS[04]

   oCol := oBrwPLA:AddCol()
   oCol:bStrData := {|| (TRANS[04])->PLAGE}

   AEval( TABVAR[15], { |DLIB,X | CRECOL(x,@TRANS,@OBRWPLA) } )

   oBrwPLA:nMarqueeStyle       := 1
   oBrwpla:nColDividerStyle    := LINESTYLE_INSET
   oBrwPLA:lColDividerComplete := .T.

   oBrwPLA:bClrStd    := {|| { CLR_BLUE, CLR_WHITE } }
   oBrwPLA:bClrHEADER := {|| { CLR_BLUE, COULDLG("TD") } }
   oBRWPLA:blDblClick := { | nRow, nCol, nKey | EditCel(@TRANS, OBRWPLA,@TPAR,nRow,nCol) }

   FOR I = 1 TO LEN(oBrwPLA:aCols)
       oBrwPLA:aCols[I]:nWidth  := TRANS[10][I]
       oBrwPLA:aCols[i]:bRClickData := {|| Menucopy(@TRANS,OBRWPLA) }
   NEXT

   AEVAL(oBrwPLA:aCols, { |DLIB,X | SETCOLBRW(x,@TRANS,@OBRWPLA) } )

   obrwPLA:nRowHeight    := AGPREF->HCELL
   oBrwPLA:ndatalines    := 4
   oBrwPLA:nHeaderLines  := 2
   OBRWPLA:nFreeze       := 1
   oBrwPLA:nCOLSEL       := 2
   oBrwPLA:nCOLoffset    := 1
   oBrwPLA:nROWSEL       := 1
   oBrwPLA:bGotFocus     := {|| IF( FILE(TRANS[04] + ".DBF"),dbSelectArea(TRANS[04]), )  }

   OBRWPLA:bKeyDown := {|nKey| iif(nKey=VK_DELETE,SUPCEL(@OBRWPLA,@TRANS, .T.) , ) }

   oBrwPLA:bKeyCount := {|| ( oBrwPLA:cAlias )->( OrdKeyCount() ) } // this has been added

   OBRWPLA:lAllowColHiding  := .F.
   OBRWPLA:lAllowRowSizing  := .F.
   OBRWPLA:l2007            := .T.

   oBrwPLA:CreateFromCODE()

   oBrwPLA:oDragCursor   := TRANS[12]

   oBrwPLA:bDragBegin    := { |nRow,nCol,nFlags| DragBegin( nRow, nCol, nFlags, @TRANS, @oBrwPLA ) }
   oBrwPLA:bDropOver     := { |uDropInfo, nRow, nCol, nFlags| DropOver( uDropInfo, nRow, nCol, nFlags, @TRANS, @oBrwPLA ) }
ENDIF
OBRWPLA:SETFOCUS()
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard,

Please try it again setting it after CreateFromCode() call:

oBrwPLA:CreateFromCODE()

oBrwPLA:bKeyCount := {|| ( oBrwPLA:cAlias )->( OrdKeyCount() ) } // this has been added
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Post by Richard Chidiak »

Anotnio,

it does not help as the error occurs from createfromcode()

this is the error.log


regards

Richard

Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL
Args:
[ 1] = U

Stack Calls
===========
Called from: => EVAL(0)
Called from: C:\CBATI32\xbrowse.PRG => (b)TXBROWSE:TXBROWSE(286)
Called from: => TXBROWSE:KEYCOUNT(0)
Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:ADJUST(789)
Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:INITIATE(697)
Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:CREATEFROMCODE(600)
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard,

Yes, you are right. I didn't noticed that it was getting called from CreateFromCode().

We are working to provide you a solution asap, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard,

Please call oBrw:SetRdd() before calling oBrw:CreateFromCode():

oBrw:SetRdd()
oBrw:CreateFromCode()

without it, we get your same error. We are doing changes and enhancements in the Class TXBrowse and some required changes may be needed. We apologize for these inconveniencies.

Here this example is working fine:

Code: Select all | Expand

#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw, oCol

   USE Customer

   DEFINE WINDOW oWnd
   
   @ 0, 0 XBROWSE oBrw OF oWnd ALIAS "Customer"
   
   oCol = oBrw:AddCol()
   oCol:bStrData = { || Customer->First }
   oCol:cHeader = "First"
   
   oBrw:SetRdd()
   oBrw:CreateFromCode()
   
   oWnd:oClient = oBrw

   ACTIVATE WINDOW oWnd

return nil
Last edited by Antonio Linares on Thu Aug 28, 2008 10:42 am, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard,

In order to not modify your source code, you can add this code to Class TXBrowse in lines 674 (Method Initiate()):

Code: Select all | Expand

   endif // existing endif for: if Empty( ::nDataType ) .or. Empty( ::aCols )

   if ( ! Empty( ::cAlias ) ) .and. ( Empty( ::bKeyCount ) .or. Empty( ::bKeyNo ) )
      ::SetRdd()
   endif   
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 6403
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Post by Otto »

After compiling with 8-08 iI have this error:

Regards,
Otto
Application
===========
Path and name: C:\xWINHOTEL\xRECHNUNG.exe (32 bits)
Size: 2,684,928 bytes
Time from start: 0 hours 0 mins 3 secs
Error occurred at: 28.08.2008, 12:41:58
Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL
Args:
[ 1] = U

Stack Calls
===========
Called from: => EVAL(0)
Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => (b)TXBROWSE:TXBROWSE(281)
Called from: => TXBROWSE:KEYCOUNT(0)
Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:ADJUST(771)
Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:INITIATE(679)
Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:CREATEFROMCODE(589)
Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => EXEC_ZIRECHNUNG(3929)
Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => ZIRECHNUNG(411)
Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => (b)MAIN(359)
Called from: c:\develop8\WH_Fwh\xRg\window.prg => TMDIFRAME:ACTIVATE(876)
Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => MAIN(359)
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard, Otto,

Please download a new FWH 8.08 build that fixes this bug. It will be available in just some minutes (we are uploading it now).

We apologize for these inconveniencies
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Post by Richard Chidiak »

Antonio

It is working ok now :D

Thank you

Regards

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Antonio Linares
Site Admin
Posts: 42519
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Post by Antonio Linares »

Richard,

Many thanks for the feedback :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply