Error at runtime.

Error at runtime.

Postby HunterEC » Tue Jun 08, 2010 5:52 am

Guys:

I'm getting the following error, which I know the cause, but don't know why it's crashing since it's from the Samples (xbimg.prg) folder. I'm using FW 8.10. Anyone can provide me where I can get these defines ?
Code: Select all  Expand view
  Error description: Error BASE/1003  Variable does not exist: TYPE_IMAGE

 


Thank you.

PD: Here's the program:
Code: Select all  Expand view
#include "FiveWin.ch"
#include "xbrowse.ch"

REQUEST DBFCDX

static hLib

function main()

   local oDlg
   local oBrw
   local nI
   local hBitMap1, hBitMap2, hBitMap3, hBitMap4
   local aArray:={}
   
   for nI = 1 to 5
      aadd( aArray, { "", space( 255 ), space( 10 ) } )
   next


   DEFINE DIALOG oDlg title "TEST" size 800,600

   @ 0,0 XBROWSE oBrw OF oDlg columns {1,2,3};
      Array aArray sizes {100,300, 100} LINES CELL autocols fastedit

   oBrw:nMarqueeStyle              := 1
   oBrw:nRowHeight                 := 33
       
   oBrw:aCols[ 1 ]:nEditType       := TYPE_IMAGE
   oBrw:aCols[ 1 ]:lBmpStretch     := .t.
   oBrw:aCols[ 1 ]:lBmpTransparent := .t.
   oBrw:aCols[ 1 ]:bStrImage       := {|oCol, oBrw| oBrw:aRow[ 2 ] }
   oBrw:aCols[ 1 ]:nDataBmpAlign   := AL_CENTER
   oBrw:aCols[ 1 ]:bPopUp          := { |o| ColMenu( o ) }
   
   oBrw:aCols[ 2 ]:nEditType       := EDIT_BUTTON
   oBrw:aCols[ 2 ]:bEditBlock      := {|nRow, nCol, oCol| oCol:Value := cGetFile( "*.*", "Select a file" )  }
   
   oBrw:aCols[ 3 ]:nEditType       := 1
   oBrw:aCols[ 3 ]:bOnPostEdit     := {|oCol, xVal, nKey| if ( alltrim( xVal ) == "1", oBrw:nMoveType := 5, oBrw:nMoveType := 6 ), oCol:Value( xVal ) }
   
   
   oDlg:oClient                    := oBrw
   
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED ON INIT oDlg:Resize()


return nil

static function ColMenu( ocol )

   local oPop

   MENU oPop POPUP 2007
      MENUITEM "Left Align" WHEN oCol:nDataBmpAlign > 0 ;
         ACTION ( oCol:nDataBmpAlign:= AL_LEFT, oCol:oBrw:Refresh() )
      MENUITEM "Center Align" WHEN oCol:nDataBmpAlign != AL_CENTER ;
         ACTION ( oCol:nDataBmpAlign := AL_CENTER, oCol:oBrw:Refresh() )
      MENUITEM "Right Align" WHEN oCol:nDataBmpAlign != AL_RIGHT ;
         ACTION ( oCol:nDataBmpAlign := AL_RIGHT , oCol:oBrw:Refresh() )

      MenuAddItem( "Transparent", ,oCol:lBmpTransparent, .t., ;
         { |oItem| oCol:lBmpTransparent := !oCol:lBmpTransparent, ;
            oItem:SetCheck( oCol:lBmpTransparent ), ;
            oCol:oBrw:refresh() } )

      MenuAddItem( "Stretch", ,oCol:lBmpStretch, .t., ;
         { |oItem| oCol:lBmpStretch := !oCol:lBmpStretch, ;
            oItem:SetCheck( oCol:lBmpStretch ), ;
            oCol:oBrw:refresh() } )

   ENDMENU

return oPop

//----------------------------------------------------------------------------//
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Error at runtime.

Postby driessen » Tue Jun 08, 2010 9:11 am

Hello,

I tried your example using FWH 10.5 and xHarbour Builder Nov. 2009.

No problem at all. Everything is running fine.

Maybe, you should update your FWH.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Error at runtime.

Postby gkuhnert » Tue Jun 08, 2010 9:41 am

It seems, the TYPE_IMAGE isn't defined in one of your .ch-Files, most likely the xbrowse.ch
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 91 guests

cron