Error coverting a browse toexcel() or toDbf()

Post Reply
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

Error coverting a browse toexcel() or toDbf()

Post by Silvio.Falconi »

Image

On source of Dialog
DEFINE BUTTON OF oBar RESOURCE "LOOK_COMBO" MENU Menulooktab(oBrw)

Menulooktab

Code: Select all | Expand

  static Function MenuLooktab(oBrwLook)
            local oPop
            local cFile :="test"
            MENU oPop POPUP
              MENUITEM "Appunti"         RESOURCE "LOOK_APPUNTI" ACTION NIL
              MENUITEM "Excel"           RESOURCE "LOOK_EXCEL"   ACTION oBrwLook:ToExcel()
              MENUITEM "Word"            RESOURCE "LOOK_WORD"    ACTION NIL
              MENUITEM "File di Testo"   RESOURCE "LOOK_TESTO"   ACTION NIL
              MENUITEM "File Dbase(Dbf)" RESOURCE "LOOK_DBF"     ACTION oBrwLook:ToDBF( cFile)
              MENUITEM "File Xlm"        RESOURCE "LOOK_XML"     ACTION NIL
              MENUITEM "File Cvs"        RESOURCE "LOOK_CVS"     ACTION NIL
           ENDMENU
return oPop




My Error

Code: Select all | Expand

Error occurred at: 02/08/22, 11:50:23
   Error description: Error BASE/1004  No exported method: TOEXCEL
   Args:
     [   1] = U  

Stack Calls
===========
   Called from:  => TOEXCEL( 0 )
   Called from: Source\ut\u_Table.prg => (b)MENULOOKTAB( 267 )



why ???
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Error coverting a browse toexcel() or toDbf()

Post by nageswaragunupudi »

You should understand from the error log that oBrwLook is nil.
Again you yourself should figure out why this variable contains NIL but not a browse object, verifying your code.
Others can not help.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

Re: Error coverting a browse toexcel() or toDbf()

Post by Silvio.Falconi »

nageswaragunupudi wrote:You should understand from the error log that oBrwLook is nil.
Again you yourself should figure out why this variable contains NIL but not a browse object, verifying your code.
Others can not help.


If I put this line

Code: Select all | Expand

 DEFINE BUTTON OF oBar RESOURCE "LOOK_COMBO"  MENU Menulooktab(oBrw)


then the command

Code: Select all | Expand

:CreateFromCode()
         END
 


run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply